Model predictive control with generalized terminal state constraint