Manufacturing Execution Systems (MES): Optimal Design, Planning, and Deployment