Design of factory, manufacturing system control