A Smart Grid Modelling Tool for Evaluating Optimal Control of Electric Vehicles