• PSO delivered the lowest system cost with 90.5% renewable penetration. • GHI model achieved high accuracy with RH and temperature as key predictors. • GHI forecasting design optimized a 460.1 kWp system, creating ∼533.158 MWh/year. This study presents an integrated framework that combines metaheuristic single-objective optimization and eXplainable Artificial Intelligence (XAI) to design a techno-economically optimized hybrid renewable energy system (HRES) for isolated regions. Five optimization algorithms—Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Grey Wolf Optimization (GWO), Flower Pollination Algorithm (FPA), and hybrid GA–PSO—were evaluated for minimizing the total system cost while satisfying load demand, renewable penetration, and operational constraints. Among these, PSO achieved the best performance with the lowest system cost of USD 359.18, while meeting all constraints with a renewable energy penetration of 90.50% of the total energy and solar contribution of 30.05% of the generated energy. A stacked ensemble model is employed to predict global horizontal irradiance (GHI) for Kathmandu, achieving high accuracy (R 2 = 0.918 ± 0.001), with SHAP analysis identifying relative humidity and air temperature as the most influential predictors. The machine learning–driven irradiance forecast is further integrated into PV system design based on the Hay Davis model, resulting in an optimized configuration of 460.1 kWp producing approximately net energy of 533.158 MWh annually. The findings highlight that coupling optimization algorithms with ML-based solar prediction enhances both economic efficiency and reliability of hybrid energy systems, offering a scalable approach for sustainable electrification in off-grid environments.
Paneru et al. (2026) studied this question.