This MATLAB code provides an implementation of the Particle Swarm Algorithm (PSO) to optimize the layout of charging piles. It includes detailed functions and algorithms for solving the charging pile layout problem by considering factors like distance, capacity, and distribution efficiency. The code aims to find an optimal positioning solution for charging stations using the Particle Swarm Optimization method. This ZIP file contains all the necessary scripts and documentation to execute the layout optimization task in MATLAB.