Optimal charging of electric vehicle fleets