The current transition from passive to active electric distribution networks comes with problems and challenges on bi-directional power flow in the network and the uncertainty in the forecast of power generation from grid-connected renewable and distributed energy sources. The power flow management would need to be distributed, flexible, and intelligent in order to cope with these challenges. Considering the optimal power flow (OPF) problem as a minimum cost flow represented with the graph, this paper applies a cost-scaling push-relabel algorithm in order to solve the OPF in a distributed agent environment. The algorithm's performance is compared with the successive shortest path algorithm developed in our previous work. The simulation is i...