Optimal Dispatching Solutions for Industry 4.0