The paper considers an algorithm for optimizing the efficient distribution of resources that determine the cost of assembly work, subject to restrictions that ensure high quality assembly of livestock machines and equipment. To determine the required tolerance values for parts, one can use the known methods of parametric optimization. Therefore, the application to the solution of the problem of the method of Lagrangian multipliers as a result of the calculations obtained the optimal tolerances of the details of the angle. Upon completion of the calculations, the optimal assembly parameters of the node for various values are obtained; the result is presented in graphical form. There are various methods for calculating component tolerances of mating parts. Methods based on the statistical evaluation of tolerances and finding their root-mean-square deviations make it possible to reduce the degree of risk when expanding the tolerance limits for mating parts and reduce assembly losses. The correct assignment of tolerances allows one to achieve significant savings in material resources and reduce production costs. The most effective solutions may be those obtained by implementing optimization procedures that ensure the minimization of the quality criterion under the conditions of restrictions determined by the components of the assembly assembly process.