Management of electric vehicle charging to mitigate renewable generation intermittency and distribution network congestion