Predictive control for hybrid systems and its application to process control