The hybrid algorithm strategy proposed in this paper aims to combine the optimal power flow with voltage-var optimization to meet the load demand, reduce the transmission line losses and maintain the voltage within a practicable range. A distributed neural network algorithm is used to seek an optimal solution of active power flow which minimizes the cost of active power. In order to ensure that the optimal power flow will not cause a serious impact to the stability of the power grid, voltage-var optimization engines which employ a multi-algorithm coordination are presented to optimize the losses of power grid and the bus voltage. The simulation of IEEE 30-bus shows that the proposed hybrid algorithm strategy can not only minimize the cost of active power generation, but also satisfy the load demand under the precondition that all the bus voltage is within the reference range. The percentages of power losses comparisons verify that the proposed hybrid algorithm strategy can decrease the transmission line losses of the power grid effectively, which will not bring a serious influence to the stability of the power grid.