Development of an Energy Management System for the Charge Scheduling of Plug-in Electric Vehicles