Below you can find a few MATLAB routines for distributed processing.
Distributed OPF - version 1
The distributed OPF software builds upon the results of:
 T. Erseghe, “A distributed approach to the OPF problem,” EURASIP Journal on Advances in Signal Processing (open access), special issue on Advanced signal processing techniques and telecommunications network infrastructures for Smart Grid analysis, monitoring and management, Vol. 45, pp. 1-13, May 2015. http://link.springer.com/article/10.1186/s13634-015-0226-x
 T. Erseghe, “Distributed optimal power flow using ADMM,” IEEE Transactions on Power Systems, Vol. 29, No. 5, pp. 2370-2380, September 2014. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6748974
 T. Erseghe, “A distributed and scalable processing method based upon ADMM,” IEEE Signal Processing Letters, Vol. 19, No. 9, pp. 563-566, September 2012. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6236008
Please give credits to these papers (as appropriate) if you use the code available below for your research.
The code is available here for download: opf_dgt_v1.
The code generates Fig. 2 of .
The code was built on MATLAB R2011b. More recent MATLAB versions may require some modifications.
The code uses IPOPT version 3.10.0 for solving local and global optimization problems. IPOPT is available from https://projects.coin-or.org/Ipopt.
The network tested were derived from the test scenarios available from the MATPOWER distribution.