Abstract--The ability to determine optimal charging profiles of electric vehicles (EVs) is paramount in developing an efficient and reliable smart-grid. However, so far the level of analysis proposed to address this issue lacks combined spatial and temporal elements, thus making mobility a key challenge to address for a proper representation of this problem. This paper details the principles applied to represent optimal charging of EVs by employing an agent-based model that simulates the travelling patterns of vehicles on a road network. The output data is used as a reliable forecast so an optimal power flow model can devise optimal charging scenarios of EVs in a local electrical network. The effectiveness of the model is illustrated by presenting a multi-day case study in an urban area. Results show a high level of detail and variability in EV charging when a present-day carbon fuel mix is compared to one with lower carbon intensity.Index Terms-Agent based transport modelling, coordination of distributed energy resources, distribution network operation, electric vehicle charging, local smart-grids, optimal power flow.