Predictive control of a hybrid powertrain