The article shows that the problem of dimension is a significant obstacle to the automation of solving the problem of finding optimal hydraulic modes of heat supply systems. To overcome this problem, the authors have previously proposed a hierarchical approach to optimizing the hydraulic modes of heat supply systems. The article discusses the problem of aggregating distribution heating networks within the framework of this approach. To solve it, the previously proposed by the authors of loop reducing dynamic programming method is adapted. Its operability and computational efficiency are checked on computational experiments.