## 6 Conclusions  
This study proposed an intelligent active and reactive power management strategy based on a population-based genetic algorithm for wind turbines installed in AC microgrids, considering both grid-connected and islanded operation modes. The methodology was validated through extensive simulations, including 100 independent executions for each evaluated scenario, using realistic daily generation and demand profiles. The primary contribution of this proposal lies in its ability to minimize operating costs, energy losses, and \(CO_{2}\) emissions while ensuring compliance with the MG's technical and operational constraints and ensuring high solution consistency and robustness. A detailed analysis of the results obtained confirms that the PGA-based strategy significantly outperforms other metaheuristic techniques (MC, PSO, JAYA, GNDO, and MVO) in both operating modes. In grid-connected mode, PGA achieved an average operating cost reduction of 63.1132% compared with the base case, with a very low standard deviation of 0.0187%, demonstrating remarkable consistency over 100 independent runs. Additionally, the energy losses were reduced by 85.1408% and the \(CO_{2}\) emissions by 65.8319%, both with minimal standard deviations (0.0197% and 0.0673%, respectively), which confirms the high reliability and robustness of the solutions found. Improvements were also observed with respect to all the methodologies used for comparison. In islanded mode, the performance of the PGA demonstrated clear superiority compared with the other evaluated metaheuristics (MC, PSO, JAYA, GNDO, and MVO) across all key performance indicators. Specifically, PGA achieved an average reduction of 9.1192% in operating costs relative to the mean performance of the other methods, reflecting its greater ability to economically optimize the MG's energy management. As for energy losses, the PGA showed average reductions of 9.2595% compared with the second-best technique, while, for \(CO_{2}\) emissions, a reduction of 0.1453% was obtained. Beyond the observed improvements in the average values, PGA also exhibited exceptional solution consistency. The standard deviation associated with the operating costs was reduced by 1.0616% compared with the average variability of the other algorithms. In the case of energy losses, the standard deviation was reduced by 3.1582%, as well as by 1.1595% for the \(CO_{2}\) emissions. These reductions in variability confirm PGA's robustness and reliability even under the more challenging conditions imposed by the islanded MG operation. Overall, PGA consistently delivered superior average performance and the lowest solution variability in both operating modes and across all optimization objectives. These findings confirm that our methodology not only guarantees significant economic, technical, and environmental improvements but also ensures highly reliable and secure energy management of modern AC MGs. Moreover, the low standard deviations observed, on the order of only a few cents (USD), milliwatts, or milligrams of \(CO_{2}\) across 100 independent executions, demonstrate PGA's outstanding repeatability. This high level of consistency significantly reduces operational risk and builds trust regarding its deployment under real-world conditions, reinforcing its robustness, precision, and practical applicability. An evaluation of the processing times required by all optimization strategies revealed highly satisfactory results in terms of computational efficiency. Overall, all methods achieved relatively short execution times, especially when considering the 24-hour horizon of the analysis. In grid-connected mode, the average processing time across all algorithms was approximately 293.72 s (about 4.89 min), confirming that the optimization of a full day of MG operation can be completed in just a few minutes. For the islanded mode, the average increased slightly to 322.75 s (approximately 5.38 min).