Simulating out-of-energy occurrences for an electric car