Fast Charging of Lithium-ion Batteries by Mathematical Reformulation as Mixed Continuous-Discrete Simulation