Real-time simulation of large distribution networks with distributed energy resources