## 6 Conclusions  
This paper comprehensively reviews the optimal sizing and energy management approaches for energy planning of microgrids. It highlights the importance of detailed energy planning and integrating the sizing and energy management stages to ensure efficient and sustainable operation. The review covers energy planning approaches incorporating renewable energy sources such as PV systems, WTs, and small hydropower plants, and discusses sizing approaches, including heuristic, mathematical, and hybrid methods. Additionally, it emphasizes energy management strategies based on optimization and commercial software. By thoroughly comparing these approaches, this paper underscores the significance of proper sizing in minimizing initial, operational, and maintenance costs, which ensures reliable and stable operation. Hybrid methodologies show high efficiency in solving complex sizing problems and finding optimal solutions. EMS based on algorithms such as genetic algorithms and mathematical programming demonstrate superior efficiency in addressing the power intermittency of renewable sources and enhancing the stability of the energy supply. Commercial software such as HOMER and DER-CAM facilitates energy planning by providing economic evaluation and sensitivity analysis. Furthermore, this review acknowledges the challenges posed by the intermittent power production ofrenewable sources, which can lead to instability. However, efficient ESS and EMS mitigate these issues and improve supply reliability. Two paradigms are identified when looking at multi-stage and single-stage sizing and energy management optimization approaches. The multi-stage approach offers the advantage of modularity and simplification, where component sizing is addressed first, followed by energy management in the second stage. It allows the application of algorithms such as the Dantzig-Wolfe decomposition, which segments the problem into subproblems and facilitates iterative convergence. On the other hand, in the single-stage approach, simultaneous integration of sizing and energy management decisions can lead to optimal solutions, but high computational demands limit the process. This methodology directly addresses the simultaneity of decisions, resulting in a more efficient but computationally expensive overall optimization. In addition, decomposition algorithms, such as Benders', allow complex problems to be broken down into more manageable parts, facilitating the solution of nonlinear and mixed problems. The advantage of this methodology is that it allows for handling uncertainties in renewable energy production and provides a robust approach to energy planning. This paper contributes to microgrid energy planning and management. First, it provides a comparative analysis of heuristic, mathematical, and hybrid sizing methodologies, underscoring their applicability in different operational contexts. Second, it introduces a detailed discussion of energy management strategies based on optimization techniques, offering practical insights for addressing the challenges associated with integrating renewable energy sources. By combining sizing and energy management stages, this work presents a framework for optimizing cost and performance in microgrid systems. Furthermore, it highlights the potential of multi-objective optimization techniques, which are essential for improving system autonomy, reducing carbon emissions, and ensuring the reliability of microgrids in diverse environments. One of the existing challenges identified in this review is the difficulty of implementing real-time control strategies that effectively leverage optimization results while managing uncertainties. The dynamic nature of microgrid operation, combined with the variability of RES, introduces substantial complexity into real-time decision-making processes.