Optimization of the production process