With the rapid growth of electric vehicles (EVs), the strategic placement and capacity planning of EV charging stations have become critical for supporting sustainable transportation and smart grid development. Traditional approaches often struggle to address the nonlinear complexities involved in optimizing both cost and service quality. In this paper, we propose a novel method for EV charging station location and capacity determination based on a bi-level model solved via an immune genetic algorithm. Our approach integrates upper-level objectives focused on minimizing investment costs for charging stations and lower-level goals aimed at reducing user charging expenses, thereby ensuring a balanced solution that benefits both providers and consumers. By leveraging the immune genetic algorithm, we efficiently handle multi-objective optimization and avoid premature convergence, leading to more reliable and economical EV charging station configurations.
The core of our method lies in formulating the EV charging station planning problem as a bi-level programming model. The upper level represents the perspective of charging station operators, targeting minimized comprehensive costs while maximizing service quality, whereas the lower level captures user behavior by optimizing individual charging strategies to reduce personal costs. This structure allows us to account for interdependent decisions between station deployment and user satisfaction. We represent the target area as a network graph $S = (U, I)$, where $U$ denotes the set of candidate nodes for EV charging station locations, and $I$ represents the paths between these nodes. This graph-based framework ensures that selected sites are feasible in terms of grid expansion capabilities and user accessibility.
In the upper-level model, the objective function minimizes the total cost $D$ associated with establishing and operating EV charging stations, expressed as:
$$ \min D = D_l + D_r + D_g + D_k $$
where $D_l$ is the land cost, $D_r$ is the construction cost, $D_g$ is the maintenance cost, and $D_k$ is the grid expansion cost. Each component is defined as follows:
$$ D_l = \sum_{m \in u} s_l \times z_i \times R_i $$
$$ D_r = \sum_{m \in u} s_{1l} \times z_i + s_{2l} \times z_i \times R_i $$
$$ D_g = \sum_{m \in u} s_{1l} \times z_i + s_{2l} \times z_i \times Z_p $$
$$ D_k = \sum_{m \in u} s_{1l} \times z_i \times (Z_p – c_{i,\max} + s_{2l} \times z_i) $$
Here, $s_l$ represents the land cost per unit, $s_{1l}$ and $s_{2l}$ denote fixed and variable costs per charging point, respectively, $z_i$ is a binary variable indicating whether a charging station is placed at node $i$, $R_i$ is the daily maintenance cost, $Z_p$ is the power load over a specified period, and $c_{i,\max}$ is the maximum power load capacity. To quantify service quality, we define the coverage distance $G$ between adjacent EV charging stations as:
$$ G = \beta \times \sum_{m \in u} f(r_{i+1}, r_i) $$
where $\beta$ is a distance parameter, and $f(r_{i+1}, r_i)$ computes the distance between nodes $i+1$ and $i$. The maximum power supply $L$ for a single EV charging station is given by:
$$ \max L = \sum_{i=1} R_{L_i} \times G $$
with $R_{L_i}$ representing the charging demand per EV. Constraints include ensuring the coverage distance does not exceed the maximum EV travel distance $D_{\max}$:
$$ \text{s.t. } G \leq D_{\max} $$
This guarantees that EV charging stations are accessible within a reasonable range.
The lower-level model focuses on user costs, with the objective function minimizing $D_u$:
$$ \min D_u = D_1 + D_2 + D_3 $$
where $D_1$ is the charging cost per vehicle (dependent on charging power and remaining battery), $D_2$ is the travel cost to reach an EV charging station (based on distance and location), and $D_3$ is the loss cost due to unmet charging demands. A key constraint ensures that the average user distance $f(u,i)$ to the nearest EV charging station is within the maximum allowable distance $L_{u,\max}$:
$$ \text{s.t. } f(u,i) \leq L_{u,\max} $$
Integrating both levels, the overall bi-level model $M$ for EV charging station planning is:
$$ M = \min D + \max L + \min D_u $$
This formulation enables a holistic optimization of economic and service-related factors for EV charging station deployment.

To solve this complex bi-level model, we employ an immune genetic algorithm, which combines the global search capabilities of genetic algorithms with immune system mechanisms such as antibody diversity and memory cell updates. The algorithm proceeds through the following steps: First, we input antigens, including parameters like distributed generation capacity and the number of EV charging stations. Second, an initial population is generated randomly, with each individual encoded as a binary string representing potential locations for EV charging stations. We ensure feasibility by considering maximum capacity limits during initialization. Third, the fitness $p_f’$ of each individual is calculated using:
$$ p_f’ = \frac{f_g \times \left( \sum_{i=1}^I n_i + l_s + \kappa \right)}{\sum_{g=0}^{N-1} f_g} $$
where $f_g$ is the fitness value, $n_i$ is the number of users served by the $i$-th EV charging station, $I$ is the total number of stations, $l_s$ is the average distance between stations, and $\kappa$ is the user demand coverage rate. Fourth, antibody affinity $K_g$ is computed to measure similarity between solutions:
$$ K_g = \sum_{g=1} (x_{yg} – x_{ug})^2 $$
where $x_{yg}$ and $x_{ug}$ represent coordinates related to antigens and antibodies, respectively. Fifth, memory cells are updated periodically to retain high-quality solutions and enhance search efficiency. Sixth, antibody promotion and inhibition are applied to maintain diversity; the concentration $H_g$ of antibodies is controlled by:
$$ H_g = \text{sim}(M) \times \frac{p_{\text{total}}}{\Psi} $$
where $\text{sim}(M)$ is the similarity between solutions, $p_{\text{total}}$ is the total population size, and $\Psi$ is the proportion of identical antibodies. The concentration probability $p_d$ for selection is:
$$ p_d = \frac{1}{N} \left(1 – \frac{t}{N}\right) $$
with $t$ being the number of individuals. Seventh, genetic operations—selection, crossover, and mutation—are performed to evolve the population. Selection uses a roulette wheel method based on fitness, crossover applies multi-point techniques to generate offspring, and mutation introduces random changes to explore new solutions. Eighth, the parent and offspring populations are merged for the next iteration. Finally, the algorithm terminates when convergence criteria are met, outputting the optimal EV charging station location and capacity scheme.
We validated our method through experiments in a simulated urban area, comparing it with existing approaches from the literature. The experimental setup included 1000 EVs, 100 charging points with a power of 50 kW each, a maximum service radius of 5 km per EV charging station, an average charging demand of 30 kWh per EV, and one charging session per EV daily. Using Simulink for simulation, we evaluated economic costs, substation capacity, total load, and user waiting times. The results demonstrated the superiority of our method in reducing costs and improving service quality for EV charging station networks.
| Test Region | Proposed Method | Reference Method A | Reference Method B |
|---|---|---|---|
| 01 | 452 | 550 | 623 |
| 02 | 359 | 428 | 489 |
| 03 | 225 | 360 | 457 |
| 04 | 288 | 417 | 551 |
| 05 | 374 | 699 | 765 |
| 06 | 524 | 874 | 969 |
| 07 | 269 | 335 | 410 |
| Total | 2491 | 3663 | 4264 |
As shown in Table 1, our method consistently achieved lower economic costs across all test regions, highlighting its cost-effectiveness for EV charging station deployment. For instance, in region 03, the cost was reduced to 225 compared to 360 and 457 for the reference methods. This reduction is attributed to the balanced optimization of land, construction, maintenance, and grid expansion costs in the upper-level model.
Further analysis of substation capacity and total load revealed that our approach optimizes grid resources more effectively. The substation capacity utilization remained stable and within safe limits, as illustrated by the following equation for capacity assessment:
$$ C_{\text{util}} = \frac{\sum_{i=1}^I Z_p \times z_i}{C_{\text{max}}} $$
where $C_{\text{util}}$ is the utilization rate, $Z_p$ is the power load, and $C_{\text{max}}$ is the maximum substation capacity. In our experiments, the average $C_{\text{util}}$ was 0.85, compared to 0.92 and 0.95 for the reference methods, reducing the risk of overloading. Similarly, the total load $T_L$ managed by the EV charging stations was optimized using:
$$ T_L = \sum_{i=1}^I R_{L_i} \times n_i $$
Our method achieved a 15% higher load capacity while maintaining grid stability, ensuring that the EV charging station network can handle peak demands without requiring costly upgrades.
User waiting time, a critical service quality metric, was significantly shortened with our method. For example, with eight charging points, the average waiting time $W_{\text{avg}}$ was calculated as:
$$ W_{\text{avg}} = \frac{\sum_{u=1}^U t_{\text{wait},u}}{U} $$
where $t_{\text{wait},u}$ is the waiting time for user $u$, and $U$ is the total number of users. Our approach reduced $W_{\text{avg}}$ by 30% compared to the reference methods, due to the optimal distribution of EV charging stations and efficient capacity allocation derived from the lower-level model. This improvement enhances user satisfaction and encourages EV adoption.
In conclusion, our bi-level model combined with the immune genetic algorithm provides a robust framework for EV charging station location and capacity determination. By simultaneously addressing operator costs and user expenses, we achieve a sustainable balance between economic efficiency and service quality. Future work will focus on incorporating dynamic traffic flows and real-time pricing into the model, as well as integrating renewable energy sources like solar-storage systems to develop low-carbon EV charging station networks. This advancement will further optimize the planning and operation of EV charging infrastructure, supporting the global transition to electric mobility.