Next Article in Journal
Temporal Evolution and Numerical Simulation of Water-Sensitive Reservoirs During Long-Term Waterflooding: A Case Study of the North 31 Wutonggou Formation
Previous Article in Journal
Experimental Study on the Axial Compressive Behavior of Concrete-Filled Steel Tube Short Columns Confined by Carbon Fiber-Reinforced Polymer Composites
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Placement and Cost Analysis of Electric Vehicle Charging Stations Using Metaheuristic Optimization

by
Hamit Kürşat Demiryürek
1,*,
Beytullah Bozali
2 and
Ali Öztürk
3
1
Departman of Electric, and Electronic Engineering, Graduate Institute of Education, Duzce University, Konuralp Campus, Düzce 81620, Türkiye
2
Department of Electricity and Energy, Düzce Vocational School, Düzce University, Düzce 81010, Türkiye
3
Department of Electric and Electronic Engineering, Faculty of Engineering, Duzce University, Konuralp Campus, Düzce 81620, Türkiye
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(21), 11729; https://doi.org/10.3390/app152111729
Submission received: 14 October 2025 / Revised: 29 October 2025 / Accepted: 30 October 2025 / Published: 3 November 2025

Abstract

The rapid adoption of electric vehicles (EVs) has made the strategic deployment of charging infrastructure a critical task for sustainable mobility. This study formulates the siting of EV charging stations as a p-median problem and applies two metaheuristic approaches—genetic algorithm (GA) and ant colony optimization (ACO)—to solve it. The cost function, defined as the combination of transportation and installation costs, was analyzed in various scenarios. The results show that ACO consistently outperforms GA, offering lower total costs and shorter solution times. Crucially, the work uses optimization results published in the literature to expand the comparison beyond GA, using GA as a typical baseline. The suggested framework is adaptable and can be used to solve different spatial planning and facility location issues. This paper offers a data-driven, scientifically based approach for EV charging infrastructure development by combining cost effectiveness and service accessibility. In addition to providing decision-makers with useful tactics for creating dependable and sustainable charging networks, it helps handle the temporal and geographical coordination issues in EV charging.

1. Introduction

The increase in the usage of electric vehicles is strategically significant for urban transportation planning, spatial resource allocation, and energy infrastructure. Because of this, choosing the best site for charging stations is essential for sustainable urban growth. The literature looks at the infrastructure needs for charging electric cars (EVs) as they become more common. For the creation of effective and sustainable charging infrastructure, important elements such as station locations, network load modeling, and scheduling strategies are examined, and optimization techniques are suggested [1]. In this context, they developed a two-stage model considering distributed energy resources and electric vehicle penetration. This model determines the location and capacity of charging stations and aims to incorporate grid operating costs, user behavior, and uncertainties related to renewable energy [2]. Electric vehicles have been increasingly popular in recent years due to the negative effects of fossil fuel usage on performance and the expense of lowering CO2 emissions. However, these developments are severely hampered by the dearth of charging facilities required for the effective use of electric products, unequal access to charging stations, and high installation prices [3,4]. Limited driving range, and particularly range anxiety, directly impacts consumers’ preferences for electric vehicles. A well-planned charging network has been suggested as a solution to this problem [3]. Various optimization methods have been proposed in the literature for the optimal location and capacity allocation of charging stations. These studies have considered various factors such as time and space-based demand modeling, distribution network impact, carbon emissions, social equity, user behavior, and infrastructure costs [5,6,7,8]. Some studies have attempted to achieve a uniform distribution of fast charging stations on major road networks using models supported by geographic information systems (GIS) [3]. Others have attempted to find solutions in large-scale systems using metaheuristic methods such as genetic algorithm (GA), ant colony optimization (ACO), particle swarm optimization (PSO), and, more recently, heuristic algorithms supported by deep learning [5,7,9,10]. Two-stage planning models aim to optimize both user behavior and grid operating conditions with frameworks that consider renewable energy integration (DER) and uncertainties [4,7,11]. Attempts have been made to develop models that evaluate social, environmental, and economic impacts using multi-criteria decision-making methods [6,12,13]. Some studies have tested the impact of planned settlements using a simulation infrastructure based on real road networks and open city-level data sources. The goal is to improve system performance by optimizing load density distribution [5,14,15]. This study aims to contribute to the location selection of electric vehicle charging stations by proposing a p-median multi-objective model that considers transportation and installation costs. The novelty of this study is the integration of transportation and installation costs into a p-median-based multi-objective model and a scenario-based comparison of GA and ACO. Thus, it provides a transferable framework for planning sustainable charging infrastructures for electric vehicles. GA and ACO algorithms are compared on a scenario basis, and the results are compared with other optimization approaches in the literature; GA is presented as a representative example. ACO is determined to be more efficient under budget-constrained planning conditions. The developed model aims to provide a general solution framework that can be adapted not only to electric vehicle infrastructure but also to other spatial decision-making problems. Furthermore, a data-driven planning approach can provide novel contributions to addressing gaps in the literature on the development of sustainable and viable electric vehicle infrastructure.
The key features of the metaheuristic algorithms proposed in our study can be summarized as follows. GA is an evolutionary search method inspired by natural selection and genetic principles, exploring the solution space through operators such as selection, crossover, and mutation. ACO is a method based on ant nests, stimulated by their foraging behavior. In it, artificial agents constantly generate solutions and directly search for the best locations through pheromones. Both methods are particularly suitable for solving complex spatial problems, such as nonlinear, multi-objective, and large-scale development systems. The remainder of the paper is organized as follows: Section 2 describes the materials and methods, including the mathematical formulation and development of the implemented algorithms. Section 3 presents and discusses the simulation results and the comparative performance analysis of GA and ACO. Section 4 concludes the paper with conclusions and main suggestions for future research.

2. Materials and Methods

The increasing prevalence of EV infrastructure necessitates the strategic location of charging stations. The optimal location should be determined by considering the distance between demand points and stations, as well as installation costs. This study mathematically formulates the EV charging station placement problem and utilizes ACO and GA optimization methods to solve it. GA represents an evolutionary algorithm inspired by the principles of natural selection. ACO reflects a swarm intelligence-based approach inspired by the foraging behavior of ants. Both algorithms are frequently used in facility location selection and electric vehicle charging station placement problems, and successful results have been achieved [16,17].

2.1. Problem Formulation

The aim of our study is to minimize access costs by locating EV charging stations in convenient locations. This minimizes the installation costs of the stations, thus reducing overall costs.
Equations (1) and (2) give the expression of decision variables to place electric vehicle charging stations in suitable locations [18].
f j = 1   if   station   j .   is   active 0   in   other   cases
fj ∈ {0, 1}, j ∈ {1,…,M}

2.1.1. Objective Function

Heuristic algorithms for optimal placement of electric vehicle charging stations use Equation (3) as the objective function.
min z = ω 1 . z 1 + ω 2 . z 2
In Equation (3), z represents the total cost (the value to be optimized). z1 and z2 represent the transportation cost based on the distance to the stations where the demand points are assigned and the installation cost of the selected stations, respectively. w1 is the coefficient of the distance cost. w2 is the coefficient of the cost of opening a station. In Equation (3), the cost function was tested under four different weight combinations ( w 1 ,   w 2 ) to represent varying priorities between transportation and installation costs. The equal-weight case ( w 1 = 1.0 ,   w 2 = 1.0 ) reflects a balanced scenario, while ( w 1 = 0.9 ,   w 2 = 1.1 ) emphasizes budget constraints, and ( w 1 = 1.1 ,   w 2 = 0.9 ) moderately prioritizes user accessibility. The extreme case ( w 1 = 1.2 ,   w 2 = 0.8 ) assigns the highest importance to transportation costs, simulating planning conditions where minimizing user travel distances is critical. These weight settings are consistent with sensitivity analysis approaches commonly found in the literature [19,20,21], and they demonstrate the adaptability of the proposed model to different planning priorities.
The weighted cost of transportation is calculated by multiplying the distance from each demand point to the nearest open station by the demand at that point. The transportation cost is given in Equation (4).
z 1 = i = 1 N d i . D min ( i )
In Equation (4), N represents the number of demand points, di represents the demand quantity for the ith demand point, and D min ( i ) represents the distance to the nearest open station for the ith demand point. Equation (4) calculates the weighted transportation cost by multiplying the distance from each demand point to the nearest open station ( d i s t i ) with its associated demand quantity ( d i ). Here, d i   reflects the estimated daily charging demand at point i , derived from local traffic density, residential/commercial land-use, and EV ownership distribution. This formulation ensures that both demand magnitude and spatial accessibility are captured in the cost evaluation.
Equation (5) gives the station installation cost [18].
z 2 = j = 1 M f j .   c j
In Equation (5), M represents the number of all potential station points, fj ∈ {0,1} is the decision variable indicating whether the jth station is open (1) or closed (0), and cj represents the fixed installation cost of the jth station. Only the costs of open stations are calculated in this study. The total setup cost is created by multiplying the setup cost by the decision variable.

2.1.2. Constraints

The minimum station constraint equation is given in Equation (6). The number of open stations must be at least H.
j = 1 M f j   H
fj ∈ {0, 1}
In Equation (7), the binary expression of the decision variables is given.

2.2. Mathematical Modeling of the P-Median Facility Location Selection Problem

The p-median facility location problem was first formulated by Revelle and Swain. The objective of this model is to minimize the total weighted distance from all demand points to the facilities to which they are assigned [22]. The objective function used in this problem aims to maximize service efficiency by minimizing the access distance between facilities and demand points.
min i = 1 n j = 1 n ω i d i j x i j
j = 1 n x i j = 1           i j       i , j = 1 , 2 , ..... , n
x i j y j           i j       i , j = 1 , 2 , ..... , n
j = 1 n y j = p
x i j , y j   0 , 1           i , j = 1 , 2 , ...... , n
x i j { 1       if   customer   i   is   assigned   to   facility   j 0                                     in   other   cases     }
y j { 1           if   a   facility   is   opened   at   point   j 0                                   in   other   cases     }
In Equations (8)–(14), wi represents the demand at point i, n represents the total number of demand points, dij represents the shortest distance between point i and point j, and p represents the median number (number of facilities). In Equation (8), in the objective function, ω i represents the demand quantity at demand point i, and d i j represents the distance between demand point i and potential facility j. x i j represents a binary decision variable that takes the value 1 if demand point i is assigned to facility j, and 0 otherwise. Equation (8) aims to minimize the weighted total distance of all demand points to assigned facilities. In this way, the model aims to reduce user access distances while increasing the overall cost-effectiveness of the system. The objective function of the p-median facility location selection problem is defined by Equation (8), and the main objective of the model is to minimize the total service cost between served facilities and demand points. The requirement that each demand point be assigned to only one facility is a fundamental constraint that ensures the integrity of the model and is expressed in Equation (9). Equation (9), the binary variable x i j , represents the assignment of demand point i   to facility j . This constraint aims to ensure that each demand point is served by a single facility. This prevents unassigned demand points and multiple assignments to different facilities. By implementing this constraint, the model reflects realistic facility planning conditions where each demand must be met uniquely and completely. The constraint that a demand point can only be assigned to open facilities is defined to ensure the applicability of the model, and this dependency is illustrated in Equation (10). In Equation (11), y j is a binary decision variable that takes the value 1 if facility j is selected and 0 if it is not. p represents the specified number of facilities to be opened. This constraint ensures that the model selects exactly p facilities from all candidates. Thus, it represents a planning condition where the number of facilities is limited for budgetary or strategic reasons. Finally, the fact that the number of active facilities is limited by p represents a capacity constraint on the system and is mathematically modeled in Equation (11) [22,23,24,25,26].

2.3. Genetic Algorithm Modeling

In this study, GA, an evolutionary approach suitable for the electric vehicle charging station location selection problem, was used due to the complexity of the solution space and the multitude of possible solution combinations.

2.3.1. Individual (Solution) Representation

f = f 1 , f 2 , .... , f M
In Equation (15), everyone is defined as a binary vector f. If each element is 1, that station is active; if it is 0, that station is inactive.

2.3.2. Initial Population

The initial population is given in Equation (16). H random stations are tried to be created so that individuals are active.
p o p i =   R a n d o m   B i n a r y   V e c t o r         W h e r e f j   H

2.3.3. Selection

In our study, we used the Roulette Wheel Method and the Tournament Selection Metod.
P i = e β . z i / x m a x k = 1 n P o p e β . z k / x m a x
In Equation (17), zi represents the cost of the ith individual, while β represents the selective pressure parameter.
In the Tournament Selection method, m individuals are randomly selected, and the lowest cost individual is chosen as the parent.

2.3.4. Crossover

The expression for Simple Single Point Crossing is given in Equations (18) and (19). The expression cc in Equations (18) and (19) represents the crossover point (randomly selected).
y 1 = x 1 ( 1 : c c ) ,   x 2 ( c c + 1 : e n d )
y 2 = x 2 ( 1 : c c ) ,   x 1 ( c c + 1 : e n d )
y 1 = x 1 ( 1 : c 1 ) ,   x 2 ( c 1 + 1 : c 2 ) , x 1 ( c 2 + 1 : e n d )
y 2 = x 2 ( 1 : c 1 ) ,   x 1 ( c 1 + 1 : c 2 ) , x 2 ( c 2 + 1 : e n d )
α j 0 , 1 y 1 = α . x 1 + ( 1 α ) . x 2 y 2 = α . x 2 + ( 1 α ) . x 1  
The expression for double-point crossing is given in Equations (20) and (21). The expression for regular crossover is given in Equation (22). After the crossover process, Equation (16) is checked again.

2.3.5. Mutation

The equation for the mutation process is given in Equation (23). In Equation (23), some bits (station status) of everyone are randomly changed at a certain rate. However, after the mutation, Equation (16) check is repeated.
y j = 1 x j   if     j   selected   positions x j                             other        

2.3.6. Elitism and the New Population

The expression for the Elitism equation is given in Equation (24). In our study, the lowest cost nPop individual is selected while preserving the best solutions.
(New Pop = Parents + Offspring + Mutants)
GA is applied as a population-based evolutionary search method that uses the standard steps of representation, selection, crossover, mutation, and elitism. Its implementation for EV charging-station placement follows conventional formulations in the literature; a schematic diagram and the pseudocode of the GA procedure are provided in Figure 1.

2.4. Modeling Ant Colony Optimization

In this study, ant colony optimization (ACO), a heuristic method inspired by the behavior of ants in nature, was applied to improve the solution quality in charging station location selection and to reach the global optimum without getting stuck in the local minimum [27,28,29,30,31,32,33]. The aim is to find the optimum station locations (vector f) to minimize the total cost (z) defined in Equation (3).

2.4.1. Pheromone Matrix (τ)

The pheromone matrix equation is given in Equation (25). Initially, it is assigned equally for all stations.
τ j = 1     j       1 , ..... , M
τ j = ( 1 ρ ) .   τ j + k = 1 n φ z k + e l i t φ z e l i t
Equation (26) gives the update expression at each iteration. In Equations (25) and (26), ρ represents the pheromone evaporation rate, zk represents the cost of the solution created by the kth ant, φ represents the pheromone contribution coefficient, and elite solutions: the best-found solutions represent the solutions that receive additional pheromone contribution [29].

2.4.2. Intuitive Knowledge (ƞ)

The heuristic information equation is given in Equation (27). It is used to give lower selection probability to high-cost stations and is then normalized.
η j = 1 c j 2 + ε

2.4.3. Probability Calculation (P)

The probability (P) equation is given in Equation (28). The probability vector in Equation (28) determines which points the ants will prefer when selecting stations. Ants make their choice stochastically according to the probability distribution in Equation (28).
P j = ( τ j ) α .   ( η j ) β l = 1 M ( τ l ) α .   ( η l ) β
In Equation (28), α represents the pheromone effect and β represents the heuristic information effect. A curve showing the change in total cost is created using the best cost values obtained through iterations.
(ACO) is employed as a swarm intelligence-based metaheuristic inspired by the foraging behavior of ants, where pheromone trails guide the probabilistic construction of solutions. The main steps and pseudocode include pheromone initialization, solution construction, pheromone updating, and stochastic selection, as illustrated in Figure 2.

3. Results & Discussion

This study was conducted in Dadaşkent, Aziziye District, Erzurum Province, using two scenarios with 1035 and 1535 demand points, respectively. The different search densities provided a comparative assessment of the consistency and flexibility of the optimization models. The primary objective of the study is to develop a feasible roadmap for optimal planning of the location and capacity of electric vehicle charging infrastructure at the regional level. The total cost function is evaluated under different weighting combinations: (w1 = 0.9; w2 = 1.1), (w1 = 1; w2 = 1), (w1 = 1.1; w2 = 0.9), and (w1 = 1.2; w2 = 0.8). These scenarios reflect the trade-off between transportation and installation costs at different levels and allow comparison of algorithm performance under multiple conditions. For this purpose, genetic algorithm (GA) and ant colony optimization (ACO) methods were used, and their performances were compared. Both metaheuristic approaches proved effective in solving the inherently NP-hard p-median location problem. The comparison results demonstrate the methods’ success in minimizing total service costs and access distances, as well as their adaptability to different demand scenarios and weighting combinations.

3.1. GA and ACO Results for 1035 Demand Points and 40 Station Locations

In this scenario, 1035 demand points and 40 station locations were considered. Optimization was performed using GA and ACO algorithms, and both methods successfully solved the p-median problem. The results showed that station locations are critical in determining total costs and range.
While solving the problems, the population size for the GA was set as nPop = 100, the maximum iteration number as MaxIt = 100, the crossover percentage as pc = 0.8, and the number of offspring as nc = 2 × round (pc × nPop/2) according to this relationship. The mutation percentage was taken as pm = 0.3, and the number of mutated individuals was calculated using nm = round (pm × nPop). In addition, the mutation rate was set as μ = 0.05 [34,35].
The following parameters were used for ACO: maximum iteration number of 100, ant population of 100, pheromone evaporation rate of 0.05, pheromone weighting factor of 1, fitness weighting factor of 2, and initial pheromone concentration of 1. For ACO, parameters such as the number of ants, pheromone evaporation rate, and heuristic coefficients ( α , β ) were also adopted from the literature and fine-tuned through preliminary tests to achieve stable convergence [36,37]. The results of the optimization performed with these parameters are presented in Table 1 and Table 2.
A combined analysis of Table 1 and Table 2 reveals significant differences in cost, solution time, and number of functions. From a cost perspective, the total cost of GA results increased steadily as the number of stations increased, reaching approximately 9.15 million units at 30 stations. In contrast, ACO achieved lower costs under the same conditions at 7.71 million units, yielding approximately 15–20% better results than GA, particularly with fewer stations.
Whereas ACOs took 10 to 17 s to solve, GAs took 20 to 26 s. This illustrates the increased time efficiency of ACO. ACO ran 5095 functions per trial, whereas GA ran 11,100 functions. This implies that ACO can accomplish comparable or superior outcomes with less computing work.
The findings demonstrate that ACO performs better than GA in terms of cost, solution time, and computing effort. This is in line with research findings and implies that ACO can offer more effective solutions, particularly in urban planning scenarios with limited funding. While GA inherently offers more flexible selection methods (roulette, tournament, random), it lags ACO in terms of solution quality and speed. Therefore, ACO can be considered a more rational choice for low-capacity station planning problems, both in terms of cost and time efficiency.
Comparative cost graphs for 30 station locations with GA and ACO solution methods are given in Figure 3.
Looking at the graphs in Figure 3, the ACO method achieves lower costs and faster convergence compared to the GA method for 1035 demand points across all weighting combinations. While the GA methods stabilized after a certain number of iterations, the ACO method provided more efficient solutions and gradually reduced costs.
Figure 3a–d show the cost convergence comparison graphs of the GA and ACO algorithms for 30 charging stations and 1035 demand points under four different weight combinations: (w1, w2) = (0.9; 1.1), (1.0; 1.0), (1.1; 0.9), and (1.2; 0.8). The results show a sharp decline in the initial iterations for GA (roulette, tournament, and random solution methods). However, the equilibrium is reached after approximately 2000 iterations. ACO consistently outperforms GA in all scenarios. It also achieves lower final cost values and demonstrates gradual improvements throughout the iteration process. Comparing the weighting configurations, it is found that (w1 = 1.2, w2 = 0.8) yields the most efficient results. In this scenario, ACO achieves a final cost of approximately 5.5 × 106, which is significantly lower than the cost levels achieved in the other cases. More critically, significantly fewer function evaluations are required to reach convergence. Because the algorithms’ calculations are unpredictable, the shapes begin at different points. ACO finds better outcomes with just 5095 function evaluations, whereas GA needs about 11,100 function evaluations to identify the ideal answers. It is understood that ACO uses greater processing power to accomplish these goals in addition to offering reduced total expenses. This implies that ACO is especially well-suited for large-scale electric vehicle charging infrastructure development, where time and computational resources are crucial. The focus on transportation expenses (w1) and the slight decrease in setup costs (w2) is responsible for this efficiency, which results in more balanced solutions that reduce user trip distances and enhance accessibility. ACO’s distributed search mechanism enables adaptive exploration and exploitation of the solution space, requiring fewer convergence evaluations compared to GA’s evolutionary operators. The superiority of the ACO (w1 = 1.2, w2 = 0.8) configuration demonstrates strong performance in addressing large-scale facility location and transportation planning problems thanks to the adaptive and distributed search mechanisms of ant colony-based approaches [19,20,21]. These results suggest that incorporating higher weights for transportation costs not only minimizes user access distances but also leads to lower overall costs through improved computational efficiency. Thus, they provide evidence supporting more sustainable and practical electric vehicle charging infrastructure planning. Figure 4 shows a concentration and some imbalance in the central areas of the station distribution obtained with GA (random solution). However, Figure 5 shows that ACO distributes demand points more evenly and homogeneously across stations, particularly by minimizing access distances. While both methods solved the p-median problem, ACO provided a more even station distribution and more cost-effective solutions.
Figure 6a–d compare the performance of the GA under two different mutation rates ( p m = 0.1 and p m = 0.3 ) for 30 charging station locations and 1035 demand points. The results show that both parameter settings achieve convergence within the first 2000 iterations, but they differ in convergence speed and stability. A lower mutation rate ( p m = 0.1 ) is consistent with commonly reported ranges in the literature and leads to faster convergence, while a higher mutation rate ( p m = 0.3 ) enhances solution diversity and prevents premature convergence, resulting in more stable outcomes across multiple runs. These findings indicate that parameter settings can influence convergence behavior, although the overall cost levels remain comparable in both scenarios. In addition, the results obtained with p m = 0.3 are presented in Table 1, and the same values were also achieved with p m = 0.1 , though the solution time was longer in the p m = 0.1 case. Furthermore, when considering the effect of the weight coefficients, the combination ( w 1 = 1.2 , w 2 = 0.8 ) yields the lowest total cost and significantly reduces user access distances. This result suggests that assigning a higher weight to transportation costs relative to installation costs ensures more effective service coverage for demand nodes and enhances the practical applicability of station placement strategies in urban planning.

3.2. GA and ACO Results for 1535 Demand Points and 40 Station Locations

In this scenario, 1535 demand points and 40 station locations were considered. Both methods, optimized with the GA and ACO algorithms, effectively solved the p-median problem and demonstrated the impact of station locations on costs and access distances as demand density increases. Optimization results are presented in Table 3 and Table 4.
The outcomes of the GA and ACO algorithms for the 1535 demand point scenario are shown in Table 3 and Table 4, respectively. The findings indicate that while both algorithms’ costs rise as demand density rises, their performance varies significantly.
In terms of expenses, ACO was able to lower expenditure to 7.96 million units under the same circumstances, whereas GA reached a peak value of 9.15 million units for 30 stations. At fewer stations, a similar pattern was seen; for instance, in the five-station scenario, GA obtained a value of 528,435 units while ACO obtained a value of 406,488 units, resulting in about 23% cost reduction. This shows that even when demand rises, ACO can optimize costs more successfully.
ACO computations normally take 14 to 20 s to complete, whereas GA computations usually take 29 to 39 s. This suggests that ACO can provide solutions 40–50% more quickly than GA.
ACO obtained more effective solutions with just 5095 functions, whereas GA performed 11,100 functions per test. This distinction shows that ACO requires less computing power to get better outcomes.
Looking at the cost diagrams shown in Figure 7, the ACO method achieved lower costs than the GA method for all weighting combinations for 1535 demand points. While GA methods achieved rapid convergence in the first few iterations and remained fixed at a certain point, ACO achieved more efficient results by gradually reducing costs throughout the iterations. The results obtained with different weight combinations (w1, w2) illustrate the impact of the parameters on total costs. Increasing the value of w1 (more weighting of transportation costs) shortens travel distances and significantly reduces total costs. In particular, the scenario (w1 = 1.2, w2 = 0.8) stands out among the other scenarios, offering the most efficient solution with final costs of approximately 5.5 × 106. ACO also outperforms GA in terms of computational performance. The shapes start from different starting points due to the random calculations of the algorithms. While GA reaches a solution in approximately 11,100 function evaluations, ACO achieves faster and more cost-effective results in only 5095 evaluations. These results are consistent with studies in the literature showing that ACO is superior in terms of computational performance and solution quality for large-scale facility layout problems [16,17,21].
Figure 8 shows the locations of 30 stations identified using a stochastic GA solution. While stations are concentrated in high-demand areas, some areas are overconcentrated, leading to load imbalances among stations. Specifically, some central stations serve many demand points, while stations in peripheral areas experience relatively lower demand.
Figure 9 shows the layout of 30 stations determined using the ACO method. The ACO method better captured the demand distribution, resulting in a more balanced distribution of supply and contributing to the homogenization of station usage. Furthermore, the ACO results resulted in shorter access routes and less congestion, particularly in densely populated areas.
In the scenario with 1035 demand points in Figure 4 and Figure 5, excessive concentration and imbalances were observed in some regions among the 30 station locations determined using the GA random solution method. In contrast, the ACO method distributed the stations more evenly, shortening commuting distances and providing a more balanced load distribution.
The differences are more pronounced in the scenario with 1535 demand points in Figure 8 and Figure 9. In the GA solutions, imbalances increased with increasing size, and while some central stations had high utilization rates, stations in peripheral areas were considered relatively underutilized. ACO more accurately captured the distribution of demand points, resulting in a more balanced supply distribution and shorter distances between stations, even with increased density.
When the 1035 and 1535 demand point scenarios were analyzed holistically, it was determined that the ACO method was more advantageous than GA in terms of scalability and efficiency.
Figure 10a–d compare the performance of the GA with two different mutation rates ( p m = 0.1 and p m = 0.3 ) for 30 charging station locations and 1535 demand points. The results confirm that both settings converge within the first 2000 iterations, but they show variations in speed and stability. While p m = 0.1   is consistent with commonly reported parameter ranges in the literature and yields faster initial convergence, p m = 0.3   enhances solution diversity and reduces the risk of premature convergence, leading to more stable performance across repeated runs. These findings suggest that parameter choices affect convergence dynamics, while the final cost values remain broadly comparable. In addition, GA-based station positioning results obtained with p m = 0.3 are presented in Table 3, and the same values were also achieved with p m = 0.1 ; however, the solution time was longer in the p m = 0.1 case. Furthermore, the analysis of weight coefficients highlights the advantage of the w 1 = 1.2 , w 2 = 0.8 scenario. This setting results in reduced overall costs and shorter access distances by giving transportation expenses more weight than installation costs. Such a weighting scheme improves the practical application of charging station placement tactics in urban situations and offers more efficient service coverage for demand points.

4. Conclusions

Using a p-median modeling technique, this study investigated the location and capacity planning of EV charging stations in Erzurum. Genetic algorithm (GA) and ant colony optimization (ACO) were used to generate solutions. According to the comparison findings, ACO constantly outperforms GA in terms of cost, quality, and computational efficiency. After 60–80 iterations, GA often stabilizes with output fluctuations of roughly ±8–10%, while ACO reduces costs by 15–25% and yields more consistent results with a smaller variance of ±3–4%. These results highlight the applicability of ACO for planning sustainable EV charging infrastructure and offer a reliable point of reference for future research topics, such as hybrid metaheuristic techniques, dynamic demand modeling, and the incorporation of renewable energy.

Author Contributions

Methodology, H.K.D.; Software, B.B.; Project administration, A.Ö. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ahmad, F.; Iqbal, A.; Ashraf, I.; Marzband, M.; Khan, I. Optimal location of electric vehicle charging station and its impact on distribution network: A review. In Energy Reports; Elsevier Ltd.: Amsterdam, The Netherlands, 2022; Volume 8, pp. 2314–2333. [Google Scholar] [CrossRef]
  2. Gan, H.; Ruan, W.; Wang, M.; Pan, Y.; Miu, H.; Yuan, X. Bi-Level Planning of Electric Vehicle Charging Stations Considering Spatial–Temporal Distribution Characteristics of Charging Loads in Uncertain Environments. Energies 2024, 17, 3004. [Google Scholar] [CrossRef]
  3. Csiszár, C.; Csonka, B.; Földes, D.; Wirth, E.; Lovas, T. Location optimisation method for fast-charging stations along national roads. J. Transp. Geogr. 2020, 88, 102833. [Google Scholar] [CrossRef]
  4. Janjić, A.; Velimirović, L.; Velimirović, J.; Vranić, P. Estimating the optimal number and locations of electric vehicle charging stations: The application of multi-criteria p-median methodology. Transp. Plan. Technol. 2021, 44, 827–842. [Google Scholar] [CrossRef]
  5. Jordán, J.; Palanca, J.; Martí, P.; Julian, V. Electric vehicle charging stations emplacement using genetic algorithms and agent-based simulation. Expert Syst. Appl. 2022, 197, 116739. [Google Scholar] [CrossRef]
  6. Loni, A.; Asadi, S. Data-driven equitable placement for electric vehicle charging stations: Case study San Francisco. Energy 2023, 282, 128796. [Google Scholar] [CrossRef]
  7. Woo, H.; Son, Y.; Cho, J.; Kim, S.-Y.; Choi, S. Optimal expansion planning of electric vehicle fast charging stations. Appl. Energy 2023, 342, 121116. [Google Scholar] [CrossRef]
  8. Zhou, G.; Zhu, Z.; Luo, S. Location optimization of electric vehicle charging stations: Based on cost model and genetic algorithm. Energy 2022, 247, 123437. [Google Scholar] [CrossRef]
  9. Wang, M.; Xie, Q. Logistics Pure Electric Vehicle Routing Based on GA-PSO Algorithm. Mechanika 2023, 29, 235–242. [Google Scholar] [CrossRef]
  10. Yin, L.; Zhang, Y. Particle swarm optimization based on data driven for EV charging station siting. Energy 2024, 310, 133197. [Google Scholar] [CrossRef]
  11. Chen, J.; Chen, H. Research on the Planning of Electric Vehicle Fast Charging Stations Considering User Selection Preferences. Energies 2023, 16, 1794. [Google Scholar] [CrossRef]
  12. Bilsel, M.; Kilic, H.S.; Kalender, Z.T.; Tuzkaya, G. Multi-objective model for electric vehicle charging station location selection problem for a sustainable transportation infrastructure. Comput. Ind. Eng. 2024, 198, 110695. [Google Scholar] [CrossRef]
  13. Mazza, A.; Russo, A.; Chicco, G.; Di Martino, A.; Colombo, C.G.; Longo, M.; Ciliento, P.; De Donno, M.; Mapelli, F.; Lamberti, F. Categorization of Attributes and Features for the Location of Electric Vehicle Charging Stations. Energies 2024, 17, 3920. [Google Scholar] [CrossRef]
  14. Lazari, V.; Chassiakos, A. Multi-Objective Optimization of Electric Vehicle Charging Station Deployment Using Genetic Algorithms. Appl. Sci. 2023, 13, 4867. [Google Scholar] [CrossRef]
  15. Mohammed, A.; Saif, O.; Abo-Adma, M.A.; Elazab, R. Multiobjective optimization for sizing and placing electric vehicle charging stations considering comprehensive uncertainties. Energy Inform. 2024, 7, 131. [Google Scholar] [CrossRef]
  16. Mladenović, N.; Brimberg, J.; Hansen, P.; Moreno-Pérez, J.A. The p-median problem: A survey of metaheuristic approaches. Eur. J. Oper. Res. 2007, 179, 927–939. [Google Scholar] [CrossRef]
  17. Wang, L.; Miwa, T.; Jiang, M.; Morikawa, T. Heterogeneous residential distribution changes and spillover effects by railway projects: The case study of Nagoya, Japan. Transp. Res. Part A Policy Pract. 2021, 154, 196–223. [Google Scholar] [CrossRef]
  18. He, S.Y.; Kuo, Y.-H.; Wu, D. Incorporating institutional and spatial factors in the selection of the optimal locations of public electric vehicle charging facilities: A case study of Beijing, China. Transp. Res. Part C Emerg. Technol. 2016, 67, 131–148. [Google Scholar] [CrossRef]
  19. Cui, J.; Maghyereh, A.; Goh, M.; Zou, H. Risk spillovers and time-varying links between international oil and China’s commodity futures markets: Fresh evidence from the higher-order moments. Energy 2022, 238, 121751. [Google Scholar] [CrossRef]
  20. Ponnam, V.K.B.; Swarnasri, K. Multi-Objective Optimal Allocation of Electric Vehicle Charging Stations and Distributed Generators in Radial Distribution Systems using Metaheuristic Optimization Algorithms. Eng. Technol. Appl. Sci. Res. 2020, 10, 5837–5844. [Google Scholar] [CrossRef]
  21. Tan, A.; Wang, C.; Wang, Y.; Dong, C. Electric Vehicle Charging Route Planning for Shortest Travel Time Based on Improved Ant Colony Optimization. Sensors 2025, 25, 176. [Google Scholar] [CrossRef] [PubMed]
  22. Revelle, C.S.; Swain, R.W. Central Facilities Location. Geogr. Anal. 1970, 2, 30–42. [Google Scholar] [CrossRef]
  23. Çelik, S. Genetik Algoritma ve Parçacık Sürü Optimizasyonu Yöntemleriyle Optimum Konumu Belirlenen Elektrikli Araç Şarj İstasyonlarının Simülasyon ile Kapasitesinin Planlaması. Master’s Thesis, Atatürk University, Erzurum, Turkey, 2020; p. 111p. [Google Scholar]
  24. Ekin, E. Solution Approach To P-Median Facility Location Problem with Integer Programming and Genetic Algorithm. Afyon Kocatepe Univ. J. Soc. Sci. 2024, 26, 547–562. [Google Scholar] [CrossRef]
  25. Kara, S.S.; Yurdakul, G. Raylı Sistem İstasyon Yeri Belirleme Problemi İçin Küme Kapsama ve Alternatif Servis Seviyeli P-Medyan Modelleriyle Çözüm Arayışı: Gebze-Darıca Metro Hattı Uygulaması. Deu Muhendis. Fak. Fen Ve Muhendis. 2021, 23, 845–856. [Google Scholar] [CrossRef]
  26. Çelik, S.; Ok, Ş. Electric vehicle charging stations: Model, algorithm, simulation, location, and capacity planning. Heliyon 2024, 10, e29153. [Google Scholar] [CrossRef]
  27. Cinsdikici, M.G.; Aydın, D. Detection of blood vessels in ophthalmoscope images using MF/ant (matched filter/ant colony) algorithm. Comput. Methods Programs Biomed. 2009, 96, 85–95. [Google Scholar] [CrossRef]
  28. Dorigo, M.; Maniezzo, V.; Colorni, A. Ant system: Optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. Part B Cybern. 1996, 26, 29–41. [Google Scholar] [CrossRef]
  29. Gao, W. New Ant Colony Optimization Algorithm for the Traveling Salesman Problem. Int. J. Comput. Intell. Syst. 2020, 13, 44–55. [Google Scholar] [CrossRef]
  30. Jiang, Q.-J.; Shao, Z.-K.; Jin, T.-L.; Li, J.-Y. Parameter Tuning for Ant Colony Optimization based Multiple Traveling Salesman Problem Optimization. In Proceedings of the 2025 Joint International Conference on Automation-Intelligence-Safety, ICAIS 2025 and International Symposium on Autonomous Systems, ISAS 2025, Xi’an, China, 23–25 May 2025. [Google Scholar] [CrossRef]
  31. Qi, Z. Application of Improved Ant Colony Algorithm in Optimizing the Charging Path of Electric Vehicles. World Electr. Veh. J. 2024, 15, 230. [Google Scholar] [CrossRef]
  32. Serin, S. Karınca Kolonisi Yaklaşımıyla Karayolu Üstyapı Rutin Bakım Çalışmalarının Planlanması. Master’s Thesis, Süleyman Demirel University, Isparta, Turkey, 2009; p. 89p. [Google Scholar]
  33. Taşyürek, M.; Erat, M. Karınca Koloni ve Genetik Algoritma Yöntemleri Kullanarak En iyi Sayaç Okuma Güzergahının Tespit Edilmesi. Dicle Univ. J. Eng. 2022, 13, 405–412. [Google Scholar] [CrossRef]
  34. Goldberg, D.E. Genetic Algorithms in Search, Optimization and Machine Learning; Addison-Wesley: Reading, MA, USA, 1989. [Google Scholar]
  35. Mitchell, M. An Introduction to Genetic Algorithms; MIT Press: Cambridge, MA, USA, 1998. [Google Scholar]
  36. Dorigo, M.; Stützle, T. Ant Colony Optimization; MIT Press: Cambridge, MA, USA, 2004. [Google Scholar]
  37. Kchaou-Boujelben, M. Charging station location problem: A comprehensive review on models and solution approaches. Transp. Res. Part C Emerg. Technol. 2021, 132, 103376. [Google Scholar] [CrossRef]
Figure 1. Pseuducode (a) and flowchart (b) of solving GA.
Figure 1. Pseuducode (a) and flowchart (b) of solving GA.
Applsci 15 11729 g001
Figure 2. Pseuducode (a) and flowchart (b) of solving ACO.
Figure 2. Pseuducode (a) and flowchart (b) of solving ACO.
Applsci 15 11729 g002
Figure 3. (ad) Comparative cost graphs obtained using GA and ACO solution methods for 30 station locations (1035 demand points).
Figure 3. (ad) Comparative cost graphs obtained using GA and ACO solution methods for 30 station locations (1035 demand points).
Applsci 15 11729 g003
Figure 4. 30 station locations with random GA solution method (1035 demand points).
Figure 4. 30 station locations with random GA solution method (1035 demand points).
Applsci 15 11729 g004
Figure 5. 30 station locations with ACO solution method (1035 demand points).
Figure 5. 30 station locations with ACO solution method (1035 demand points).
Applsci 15 11729 g005
Figure 6. (ad) Comparison of GA with different mutation rates (pm = 0.1 vs. pm = 0.3) for the placement of 30 charging stations (1035 demand points).
Figure 6. (ad) Comparison of GA with different mutation rates (pm = 0.1 vs. pm = 0.3) for the placement of 30 charging stations (1035 demand points).
Applsci 15 11729 g006
Figure 7. (ad) Comparative cost graphs obtained using GA and ACO solution methods for 30 station locations (1535 demand points).
Figure 7. (ad) Comparative cost graphs obtained using GA and ACO solution methods for 30 station locations (1535 demand points).
Applsci 15 11729 g007
Figure 8. 30 station locations with random GA solution method (1535 demand points).
Figure 8. 30 station locations with random GA solution method (1535 demand points).
Applsci 15 11729 g008
Figure 9. 30 station locations with ACO solution method (1535 demand points).
Figure 9. 30 station locations with ACO solution method (1535 demand points).
Applsci 15 11729 g009
Figure 10. (ad) Comparison of GA with different mutation rates (pm = 0.1 vs. pm = 0.3) for the placement of 30 charging stations (1535 demand points).
Figure 10. (ad) Comparison of GA with different mutation rates (pm = 0.1 vs. pm = 0.3) for the placement of 30 charging stations (1535 demand points).
Applsci 15 11729 g010
Table 1. GA-based station positioning results (1035 demand points).
Table 1. GA-based station positioning results (1035 demand points).
WeightsMethodNumber of StationsBest Cost (Unit)Time (Sec)
w1 = 0.9
w2 = 1.1
Roulette Wheel Method5528,423.840318.755
101,507,898.391719.3474
152,600,142.95221.4276
203,910,835.866921.7708
256,095,324.971520.4426
309,153,610.417220.2904
Tournament Selection Method5528,423.840318.8981
101,507,898.391721.0609
152,600,142.95224.5617
203,910,835.866919.8669
256,095,324.971521.6699
309,153,610.417226.1362
Random Solution Method5528,423.840320.7837
101,507,898.391721.1595
152,600,142.95222.0567
203,910,835.866920.296
256,095,324.971519.9503
309,153,610.417219.657
[13,26]
w1 = 1
w2 = 1
Roulette Wheel Method5480,387.600321.0337
101,370,818.213024.1918
152,363,767.724423.8657
203,555,306.518725.2528
255,541,205.523821.0406
308,321,464.90822.2517
Tournament Selection Method5480,387.600322.0521
101,370,818.213021.6374
152,363,767.724421.0744
203,555,306.518720.9676
255,541,205.523821.3158
308,321,464.90821.5167
Random Solution Method5480,387.600320.6076
101,370,818.213020.8197
152,363,767.724420.4193
203,555,306.518720.6475
255,541,205.523820.216
308,321,464.90821.1915
w1 = 1.1
w2 = 0.9
Roulette Wheel Method5432,351.360420.7088
101,233,738.034325.7194
152,127,392.496926.8998
203,199,777.170624.7711
254,987,086.076224.0061
307,489,319.398825.4554
Tournament Selection Method5432,351.360421.9336
101,233,738.034322.3719
152,127,392.496928.4227
203,199,777.170628.3149
254,987,086.076225.8091
307,489,319.398822.1446
Random Solution Method5432,351.360423.8509
101,233,738.034321.2729
152,127,392.496921.0781
203,199,777.170625.4831
254,987,086.076224.1565
307,489,319.398821.4968
w1 = 1.2
w2 = 0.8
Roulette Wheel Method5384,315.120421.8645
101,096,657.855620.2901
151,891,017.269321.8783
202,844,247.822523.1534
254,432,966.628625.4719
306,657,173.889526.0406
Tournament Selection Method5384,315.120421.9265
101,096,657.855625.0044
151,891,017.269325.1768
202,844,247.822522.6945
254,432,966.628622.5757
306,657,173.889526.8153
Random Solution Method5384,315.120425.1584
101,096,657.855622.2908
151,891,017.269326.7027
2028,44,247.822521.6301
254,432,966.628622.5041
306,657,173.889522.3328
Table 2. ACO-based station positioning results (1035 demand points).
Table 2. ACO-based station positioning results (1035 demand points).
WeightsNumber of StationsBest Cost (Unit)Time (Sec)
w1 = 0.9
w2 = 1.1
5406,480.486410.2387
101,333,409.111610.854
152,590,965.698911.9365
204,016,561.434413.1641
255,783,681.07716.5156
307,713,389.902317.3751
w1 = 1
w2 = 1
5369,528.92339.6294
101,133,334.782810.0508
152,434,284.361210.8504
203,651,420.417411.4383
255,179,035.046711.5601
306,706,650.115211.7645
w1 = 1.1
w2 = 0.9
5332,578.1419.853
101,020,001.293410.0143
152,048,911.886210.3737
203,219,765.990111.7497
254,661,132.63411.8491
306,310,956.805611.959
w1 = 1.2
w2 = 0.8
5295,627.015710.8451
10906,670.299311.4015
151,884,342.117411.7966
203,106,433.426412.8718
254,021,020.340912.9210
305,609,740.252613.8997
Table 3. GA-based station positioning results (1535 demand points).
Table 3. GA-based station positioning results (1535 demand points).
WeightsMethodNumber of StationsBest Cost (Unit)Time (Sec)
w1 = 0.9
w2 = 1.1
Roulette Wheel Method5528,435.406329.5066
101,507,905.920528.0497
152,600,149.896728.839
203,910,842.09629.194
256,095,330.658529.2244
309,153,615.46628.6504
Tournament Selection Method5528,435.406329.2393
101,507,905.920529.2085
152,600,149.896729.8672
203,910,842.09629.2407
256,095,330.658529.9993
309,153,615.46629.9799
Random Solution Method5528,435.406329.5284
101,507,905.920531.9647
152,600,149.896731.2996
203,910,842.09630.0185
256,095,330.658530.9585
309,153,615.46629.8658
w1 = 1
w2 = 1
Roulette Wheel Method5480,400.451529.408
101,370,826.578329.0725
152,363,775.440735.4018
203,555,313.4431.4103
255,541,211.842830.1009
308,321,470.517835.8789
Tournament Selection Method5480,400.451533.5891
101,370,826.578331.2243
152,363,775.440736.3428
203,555,313.4434.5482
255,541,211.842836.9039
308,321,470.517830.2614
Random Solution Method5480,400.451531.0121
101,370,826.578332.1508
152,363,775.440729.3197
203,555,313.4430.0639
255,541,211.842829.647
308,321,470.517829.9319
w1 = 1.1
w2 = 0.9
Roulette Wheel Method5432,365.496637.7539
101,233,747.236138.1092
152,127,400.984838.5319
203,199,784.78437.9094
254,987,093.027138.2969
307,489,325.569637.9782
Tournament Selection Method5432,365.496638.4997
101,233,747.236139.2898
152,127,400.984838.8148
203,199,784.78439.4417
254,987,093.027139.2178
307,489,325.569638.8487
Random Solution Method5432,365.496637.9232
101,233,747.236137.6347
152,127,400.984838.6011
203,199,784.78438.6867
254,987,093.027138.2548
307,489,325.569638.5946
w1 = 1.2
w2 = 0.8
Roulette Wheel Method5384,330.541838.1012
101,096,667.89438.7382
151,891,026.528939.512
202,844,256.12837.9886
254,432,974.211439.8795
306,657,180.621438.2015
Tournament Selection Method5384,330.541839.5944
101,096,667.89437.7204
151,891,026.528938.8818
202,844,256.12839.9965
254,432,974.211439.7603
306,657,180.621438.4045
Random Solution Method5384,330.541838.9016
101,096,667.89439.0349
151,891,026.528939.6881
202,844,256.12838.4648
254,432,974.211439.4757
306,657,180.621438.3501
Table 4. ACO-based station positioning results (1535 demand points).
Table 4. ACO-based station positioning results (1535 demand points).
WeightsNumber of StationsBest Cost (unit)Time (sec)
w1 = 0.9
w2 = 1.1
5406,488.774120.0761
101,333,415.300714.9639
152,672,268.151815.1818
204,520,678.927316.211
256,033,017.802814.7424
307,968,174.785815.5618
w1 = 1
w2 = 1
5369,540.580516.0451
101,364,960.01115.4051
152,508,192.468514.7589
203,651,425.632115.6658
255,331,801.445915.1888
306,859,416.125515.8235
w1 = 1.1
w2 = 0.9
5332,588.929615.3857
101,090,981.56616.7759
152,119,891.162516.8678
203,494,742.528818.2357
254,869,595.17117.399
306,310,961.836915.7726
w1 = 1.2
w2 = 0.8
5295,641.004315.7086
10969,768.820415.8662
151,884,349.026817.7192
203,106,439.126514.669
254,328,531.744717.0717
305,672,831.938415.7802
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Demiryürek, H.K.; Bozali, B.; Öztürk, A. Optimal Placement and Cost Analysis of Electric Vehicle Charging Stations Using Metaheuristic Optimization. Appl. Sci. 2025, 15, 11729. https://doi.org/10.3390/app152111729

AMA Style

Demiryürek HK, Bozali B, Öztürk A. Optimal Placement and Cost Analysis of Electric Vehicle Charging Stations Using Metaheuristic Optimization. Applied Sciences. 2025; 15(21):11729. https://doi.org/10.3390/app152111729

Chicago/Turabian Style

Demiryürek, Hamit Kürşat, Beytullah Bozali, and Ali Öztürk. 2025. "Optimal Placement and Cost Analysis of Electric Vehicle Charging Stations Using Metaheuristic Optimization" Applied Sciences 15, no. 21: 11729. https://doi.org/10.3390/app152111729

APA Style

Demiryürek, H. K., Bozali, B., & Öztürk, A. (2025). Optimal Placement and Cost Analysis of Electric Vehicle Charging Stations Using Metaheuristic Optimization. Applied Sciences, 15(21), 11729. https://doi.org/10.3390/app152111729

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop