The exhaustive knowledge of optimal power flow (OPF) methods is critical for proper system operation and planning, since OPF methods are utilized for finding the optimal state of any system under system constraint conditions, such as loss minimization, reactive power limits, thermal limits of transmission lines, and reactive power optimization. Incorporating renewable energy sources optimized the power flow of system under different constraints. This work presents a comprehensive study of optimal power flows methods with conventional and renewable energy constraints. Additionally, this work presents a progress of optimal power flow solution from its beginning to its present form. Authors classify the optimal power flow methods under different constraints condition of conventional and renewable energy sources. The current and future applications of optimal power flow programs in smart system planning, operations, sensitivity calculation, and control are presented. This study will help the engineers and researchers to optimize power flow with conventional and renewable energy sources.