An efficient MPC algorithm for switched systems with minimum dwell time constraints