Adaptive discretization and solution structure detection of multi-stage optimal control problemsPrévenez-moi