Development and Numerical Optimization of a System of Integrated Agents for Serial Production Lines