Enabling predictive energy management in vehicles