Distributed energy resource networks : planning, control and market design