Modelling the transition to a low-carbon energy supply