## 1 Introduction
As a result, BG stands out as an appealing, cost-effective, and environmentally friendly option for areas like Aras de los Olmos [20]. This study focuses on optimizing HESs to fulfill the unique requirements of Aras de los Olmos, which are cost reduction and increased reliability. To pursue these goals, twoscenarios are explored: one emphasizes an economical setup using the grid as the main power source, while the other focuses on enhancing reliability by partially replacing grid power with a BG when needed. Comparing these configurations will show how blending grid and BG solutions can provide a stable supply at lower costs, offering a practical and efficient energy approach. All analyses were conducted using HOMER Pro 3.16.2 (Hybrid Optimization of Multiple Energy Resources) software developed by the U.S. National Renewable Energy Laboratory (NREL) [21]. HOMER is a widely recognized and extensively used software tool for designing and analyzing HESs. For example, [PERSON]. [22] used HOMER to create a cost-effective, eco-friendly HES, including photovoltaic (PV) panels, wind turbines (WTs), and battery energy storage (BES) for an isolated island. It reduced greenhouse gas emissions, lowered energy costs, and enhanced reliability, with frequency stability analysis confirming its ability to handle fluctuating demand and supply. Similarly, ref. [23] integrated advanced storage technologies, such as supercapacitors and redox-flow batteries, into an off-grid solar wind system. This demonstrates that these technologies significantly enhance reliability, reduce energy losses, and minimize emissions, ensuring a stable and efficient solution for off-grid applications. The software has gained popularity among researchers and engineers worldwide for its ability to simulate and compare configurations under realistic conditions. In [24], HOMER is used to assess the feasibility and cost-effectiveness of solar home systems under real-world environmental and financial conditions, identifying an optimal design that enhances reliability and reduces dependence on conventional energy sources. This underscores HOMER's effectiveness in optimizing residential renewable solutions. In addition to offering detailed insights into both technical and economic performance [25; 26], HOMER's user-friendly interface makes it accessible for those new to energy planning and seasoned professionals [27; 28]. As a result, it has been employed in numerous projects--ranging from off-grid rural electrification [29; 30] to grid-connected microgrids [31; 32]--to identify cost-effective, reliable, and environmentally sustainable solutions [33; 34]. Previous optimization studies have widely addressed RESs, employing various optimization algorithms to minimize operational costs and emissions and enhance system reliability [35; 36; 37; 38]. For example, ref. [39] introduced a modified energy management strategy for PV/diesel hybrid systems, incorporating the Artificial Protozoa Optimizer to reduce diesel consumption. Their results demonstrated that optimizing renewable energy sources significantly reduces costs and enhances sustainability. Similarly, ref. [40] optimistically optimizes electric vehicle charging stations in radial power systems, integrating distributed generation and vehicle-to-grid technologies. Their study highlights how optimized integration can reduce costs, limit emissions, and improve grid reliability. Ref. [41] investigated sustainability issues in condition-based maintenance and residual life prediction in energy systems. Their study explores how integrating renewable energy sources with predictive maintenance strategies can reduce costs, improve reliability, and extend system lifespan. The research highlights that significant operational cost reductions and emission minimization can be achieved by optimizing maintenance schedules and using data-driven energy management.