Smart factories and cyber-physical systems