Optimal Charging Scheduling For Electric Vehicles Based On A Moving Horizon Approach