Optimal life-cycle costs of batteries for different electric cars