programmation d’un algorithme de simulation