A rule‑based energy management system for hybrid renewable energy sources with battery bank optimized by genetic algorithm optimization