In this study, we aim to find the key factors affecting the location of electric vehicle charging stations. We first developed a Non-deterministic Polynomial (NP) model that aims to minimize the total travel distance of cars. Second, we applied an agent-based simulation algorithm to determine the optimized location for charging stations. Finally, we conducted multi-simulation and statistical analysis of passenger priority, car mileage, electric vehicle distribution and passenger distribution using a one-way analysis of variance (ANOVA). The results of this study show that priority is not a factor affecting the location of electric vehicle (EV) charging stations and that mileage, the EV distribution and the passenger distribution are factors affecting the location of EV charging stations, with exogenous variables such as the type of circuit and the voltage drawn as constants. The proposed model can help provide a reference for the location of charging stations in urban areas.