An iterative optimization framework for delay management and train scheduling