Distribution network optimization