Machine Learning and Optimization for Production Rescheduling in Industry 4.0