Optimal power flow analysis is a calculation to minimize an objective function, namely generation costs or transmission losses by regulating the active power and reactive power generation of each interconnected power system generator by taking into account certain limits. The growth of industrial loads which are dominated by inductive loads requires a fairly large reactive power supply. This reactive power requirement will of course reduce the available power that can be transmitted to the load. Reactive power flow in transmission lines will reduce the active power distribution capacity required by the load. Reactive power flow that is too large can also cause losses. However, this reactive power is also an important component in the stability of the electric power system. For this reason, the flow of active and reactive power in transmission lines needs to be regulated so that the capacity and stability of the electric power transmission system is maintained.