Abstract This study analyses optimal capacity planning of the energy system in the context of large-scale diffusion of electric vehicles (EVs), and explores the potential benefits of flexible EV charging. Here, the open-source model GRIMSEL, which is characterized by high granular representation…