Stability of Logical Dynamic Systems With a Class of Constrained Switching