Predictive maintenance and the smart factory