Ordered charging optimization of electric vehicles