Envoyer par SMS: Piecewise methods and applications to power systems