Switching and impulsive control algorithms for nonlinear hybrid dynamical systems. (February 2018)