Overloading of network structures is a problem that we encounter every day in many areas of life. The most associative structure is the transport graph. In many megacities around the world, the so-called intelligent transport system (ITS) is successfully operating, allowing real-time monitoring and making changes to traffic management while choosing the most effective solutions. Thanks to the emergence of more powerful computing resources, it has become possible to build more complex and realistic mathematical models of traffic flows, which take into account the interactions of drivers with road signs, markings, and traffic lights, as well as with each other. Simulations using high-performance systems can cover road networks at the scale of an entire city or even a country. It is important to note that the tool being developed is applicable to most network structures described by such mathematical apparatuses as graph theory and the applied theory of network planning and management that are widely used for representing the processes of organizing production and enterprise management. The result of this work is a developed model that implements methods for modeling the behavior of traffic flows based on physical modeling and machine learning algorithms. Moreover, a computer vision system is proposed for analyzing traffic on the roads, which, based on vision transformer technologies, provides high accuracy in detecting cars, and using optical flow, allows for significantly faster processing. The accuracy is above 90% with a processing speed of more than ten frames per second on a single video card.