###### Abstract  
Optimal power flow (OPF) is widely used in power systems. This problem involves adjusting variables such as online capacity, generator output, power stability, and bus voltage to reduce production costs. This paper presents HFAJAYA, a combined evolution method using the Firefly and JAYA algorithms to solve the OPF problem effectively and efficiently. While considering renewable energy, including solar energy and wind energy systems, the problem is regarded as a single-objective and multi-objective function. It considers power losses, emissions, emissions taxes, the total cost of fuel, and voltage deviation as  
(AGSO) [19], a multi-objective particle swarm optimization (PSO) [20], interior search algorithm (ISA) [21], a modified bacteria foraging [22], differential evolution (DE) [23], chaotic invasive weed optimization (CIWO) [24], DE for OPF solutions incorporating stochastic wind and solar power [25], a new improved adaptive DE [26], an enhanced self-adaptive DE [27], multi-objective DE algorithm [28], the security constrained OPF with wind and thermal generators by a new hybrid algorithm [29], BAT search algorithm [30], multi-objective dynamic OPF (MODOPF) [31], an improved artificial bee colony (IABC) [32], a modified ABC algorithm [33], a chaotic ABC algorithm [34], solving OPF by means of multi-objective glowworm swarm optimization (MOGSO) which is applicable in a wind energy integrated system [35], a powerful optimizer using DE and PSO (DEPSO) algorithms [36], a sine-cosine algorithm (SCA) [37] and SCA for OPF dependent on a hydro-thermal wind arrangement of mixture power scheme [38], social spider optimization (SSO) [39], uncertainty modeling [40], ant lion algorithm (ALA) [41], grey wolf optimizer (GWO) [42], modified honey bee mating optimization (MHBMO) [43], a new hybrid algorithm using PSO [44], an improved strength Pareto evolutionary algorithm [45], a hybrid optimizer via genetic GA and TLBO algorithms (G-TLBO) [46], multi-objective electromagnetism-like algorithm (MOELA) [47], a hybrid PSO and SFLA algorithm [48], considering optimal FACTS devices in OPF by PSOGSA [49], etc.  
The firefly insect algorithm [50] is one of the effective intelligent methods used in nonlinear optimizations. [PERSON] introduced this method in 2008, and it has achieved many successes in solving optimization problems, including autonomous mobile robots with optimized parameters [51], privacy preservation in social networks [52], clustering on different functions [53], manufacturing cell formation via a new discrete FA (DFA) to [54], etc. However, it has been observed that this algorithm for complex nonlinear problems sometimes becomes stuck in the local solution and loses its optimization power [51; 52; 53; 55].  
Alternatively, evolutionary algorithms can escape local optima but are slow to converge. I developed HFAJAYA, a hybrid evolutionary algorithm to optimize power flow problems to resolve this problem. According to the simulation results, the current proposed hybridization approach significantly improves the ability of the JAYA and FA algorithms to escape the local optimum due to their rapid convergence speed.  
This study is continued in four sections as the OPF problems formulation is introduced in Section 2. The concepts and structure of FA, JAYA, and the proposed HFAJAYA algorithm are introduced in Section 3. The outcomes of the simulations and a discussion of the findings are reported in Section 4. Lastly, Section 5 details the outcomes of the paper.