This research introduces a novel and promising approach to optimize the deployment of drone nests for transmission line inspection by enhancing the Particle Swarm Optimization (PSO) algorithm with penalty functions and dynamic inertia. By effectively utilizing penalty functions, the study addresses the constraints of the optimization problem, transforming it into an unconstrained optimization task and allowing for more effective exploration of the search space. Additionally, the dynamic inertia strategy enables the algorithm to strike a balance between global exploration and local exploitation, leading to improved convergence rates and enhanced solution quality. Through a comprehensive comparison with both static inertial weight PSO and genetic algorithm (GA), the enhanced PSO algorithm exhibited superior performance, highlighting its ability to efficiently overcome the limitations of traditional algorithms and optimize the placement of drone nests effectively. The proposed approach demonstrates encouraging results in minimizing flight costs and generating near-optimal solutions for large-scale drone nest placement problems. The study's modest yet significant contribution lies in its potential to advance intelligent drone-based inspection platforms, offering the promise of increased inspection efficiency and potential cost savings for power grid inspections.