Efficient conversion of mixed logical dynamical systems into an equivalent piecewise affine form