###### Abstract  
Unmanned aerial vehicles (UAVs) are increasingly deployed in dynamic environments for applications such as surveillance, delivery, and data collection, where efficient task allocation and path planning are critical to minimizing mission completion time while managing limited energy resources. This paper proposes a novel approach that integrates energy management into a rolling horizon framework for dynamic UAV task allocation and path planning. We introduce an enhanced Particle Swarm Optimization (PSO) algorithm, incorporating adaptive perturbation strategies and a local search mechanism based on simulated annealing, to optimize UAV task assignments and routes. The rolling horizon framework enables the system to adapt to evolving task demands over time. Energy consumption is explicitly modeled, accounting for flight, computation, and recharging at designated stations, ensuring practical applicability. Extensive simulations demonstrate that the proposed method reduces the mission makespan significantly compared to conventional static planning approaches, while effectively balancing energy usage and recharging requirements. These results highlight the potential of our approach for real-world UAV operations in dynamic settings. or dynamic surveillance, tasks may appear or change unpredictably, necessitating a more flexible and adaptive planning framework [5]. Energy management further complicates UAV mission planning. UAVs have limited battery capacity, and energy consumption must be carefully managed to avoid mission failures due to depleted batteries. This requires not only efficient path planning but also strategic decisions about when and where to recharge, especially in missions spanning large areas or extended durations [5]. Existing methods often overlook the interplay between task allocation, path planning, and energy constraints, leading to suboptimal performance in dynamic environments [6]. To address these challenges, this paper introduces a novel approach that integrates dynamic task allocation, path planning, and energy management within a rolling horizon framework. The rolling horizon paradigm allows the system to adapt to changing task demands by replanning at regular intervals, incorporating new information as it becomes available [6]. This is particularly advantageous in scenarios where tasks are revealed incrementally or where the environment is subject to change. At the core of our approach is an enhanced Particle Swarm Optimization (PSO) algorithm, tailored to handle the complexities of UAV coordination. PSO is a population-based metaheuristic known for its efficiency in solving large-scale optimization problems [7]. However, standard PSO may struggle with the dynamic nature of UAV missions and the need for rapid adaptation. To overcome this, we incorporate adaptive perturbation strategies and a local search mechanism based on simulated annealing. These enhancements enable the algorithm to escape local optima and explore the solution space more effectively, leading to better-quality solutions in fewer iterations [8; 9]. The contributions of this paper are threefold:  
1. We propose a rolling horizon framework for dynamic UAV task allocation and path planning, allowing the system to adapt to evolving task demands and environmental conditions. 2. We develop an improved PSO algorithm with adaptive perturbation and simulated annealing-based local search, specifically designed to handle the multi-objective nature of the problem, including energy constraints. 3. We present a comprehensive energy management model that accounts for flight, computation, and recharging activities, ensuring that UAVs can complete their missions without energy depletion. Simulation results demonstrate that our method significantly reduces the mission makespan compared to traditional static planning approaches while effectively managing energy consumption and recharging needs. These findings underscore the potential of our approach for real-world UAV applications in dynamic environments.