Modeling of non-smooth dynamical systems#