Optimized Task Assignment and Predictive Maintenance for Industrial Machines using Markov Decision Process