A multi-agent approach has been developed to find the optimal distribution of freight traffic on the considered railway loop for multimodal transportation carried out within the framework of an oligopolistic market. At the first stage of research, the method of economic-geographical delimitation of the «influence areas» of loading stations, developed earlier by the authors, is applied. The obtained territorial picture of the rational distribution of traffic flows is used further when introducing restrictions in a multi-criteria optimization problem, which is solved as an integer programming problem in the environment of the system of analytical calculations. As a result, on the basis of an assessment of the transport and technological infrastructure of the loop and the cost of transport services, a mathematical model is built that allows to optimize the process of freight transportation.