An optimization model for electrical vehicles scheduling in a smart grid