Regular regimes of oil and oil products pipelines are studied. The problem is to develop an algorithm of effective pipeline system control that ensures the fulfillment of specified boundary conditions at the system boundaries. The product is pumped in batches, the flow is characterized by a change in temperature and pressure flow parameters over time. The developed solution method uses the principle of decomposition in the sense that each computational iteration is im-plemented in 3 stages, in three nested loops. The inner cycle is connected with the material bal-ance relations, at the next cycle the flow equations are introduced and the fulfillment of the 2nd Kirchhoff's law is monitored. If the flow process is significantly affected by temperature, then an external cycle is also implemented, correcting the solution so that the energy conservation equa-tion is satisfied. In the calculation procedure, some computational difficulties may arise, which consist in choosing an appropriate optimization method. On a specific example, the possibility of using various library programs to solve the problem was checked. The developed method is suita-ble for the analysis of systems of arbitrary topology. Since the method is not time-consuming, it can be recommended for online control of oil and oil products supply systems. The paper opens a new direction in the theory of hydraulic circuits. It uses both traditional methods of continuum mechanics and stochastic models.