A set-theoretic based control architecture for constrained switching systems