Model predictive control of hybrid systems based on mode-switching constraints