Intelligent factory design