An online approach to dynamic rescheduling for production planning applications