Building optimal routes for cargo delivery taking into account the dynamics of traffic flows

. A method for optimizing the route based on a modified ant algorithm is proposed, taking into account the unsteady dynamics of traffic flows in the urban road network. Within the framework of the method, simulation of the building of optimal routes was carried out using the example of Kyiv. It is shown the possibility of using the method for solving problems of effective control over the process of routing freight traffic in conditions of actual dynamics of traffic flows (synchronized traffic, wide moving jam, congestion, emergency situations, etc.)


Introduction
Accelerated motorization in the conditions of backlog of development of urban road networks (URN) leads to a sharp increase in the number of vehicles on highways, the intensification of traffic. This, in turn, significantly affects the workload of URN, contributes to the occurrence of the congestion and a decrease in the speed of traffic. Long congestion on the roads is increasingly causing not only temporary, but also economic losses. This issue is especially acute for enterprises that deliver their own, for example small-lot, goods to consumers without intermediaries, that is, using their own transport.
The main thing in urban transport logistics is the solution to routing problems using such methods of route optimization that would effectively take into account the actual dynamics of traffic flows on URN.
Thus, the relevance of the study is determined by the need to develop, implement and apply appropriate models, methods and software to optimize and manage the transport process in conditions of unsteady dynamics of traffic flows on the URN. The use of such developments will increase the efficiency of transportation of goods within large cities.

literature review and problem statement
Existing methods of discrete optimization of transport routes are not ideal and in most cases solve optimization problems for stationary states of the transport network [1][2][3][4][5][6][7][8].
In [1] the authors consider methods and models for assessing the efficiency of transport and various types of logistics operations in supply chains. Based on the analysis of the results it is shown that to date there is no single approach for obtaining adequate estimates of the effectiveness of the corresponding processes [1].
The model for solving the multi-purpose task of routing vehicles with time constraints was proposed in [2]. This problem is solved using a modified genetic algorithm. The optimal solution here is a trade-off between the cost of transporting the goods and the size of the car fleet necessary for customer service.
In [3], a new algorithm is proposed that allows an optimization procedure to be performed while simultaneously considering all paths of motion between graph nodes taking into account the throughput of each of its edges. This method is based on the representation of a graph in the form of an electrical network, each of whose sections has a certain resistance characterizing the corresponding capacity of the network sections.
It should be noted that the method of [3] is analogous to the method of discrete optimization, based on the use of the effects of self-organization of ant agents [4]. The classical method of self-organization of the ant colony [4] provides the possibility of finding the optimal path for the static graph. The various properties attributed to ant agents make it possible to solve a wide class of discrete optimization problems taking into account many characteristics of the investigated system. In particular, further numerous studies of various physical processes that were carried out using this method indicate that it is promising for solving discrete optimization problems of large dimension [5]. This concerns the routing of vehicles on URN and highways, information flows in computer networks, etc.
In addition, today a large number of modifications of the ant algorithm are presented. In [6], the authors proposed a modification of the classical algorithm with the introduction of "elite ants" Elitist Ant System into it. This modification allowed us to reduce the number of iterations of the algorithm and, as a result, the time of finding the optimal solution. The disadvantage of the proposed method is need to research of definition of the number of such elite ants.
The modification of the ant algorithm (Max-Min Ant System) presented in [7] offers limitations on the maximum and minimum concentration of pheromone. Here, the increase in the concentration of pheromone occurs on the best routes that have been covered by ants.
The proposed modifications make it possible to increase the efficiency of using the ant algorithm in comparison with the classical algorithm.
It should be noted that most of the modifications proposed in [6][7][8] are used to solve the static traveling salesman problem (TSP). One example of solving the dynamic traveling salesman problem (DTSP) by such modifications of the algorithm is the so-called problem of Cash Machines [9].
In our view, the application of the ant algorithm method can be promising for solving problems of optimization of processes occurring in open nonlinear dynamical non-stationary systems. Here, one must admit that in recent years there has been a rapid development of theoretical concepts, models, methods for describing nonlinear non-equilibrium dissipative processes and phenomena occurring in systems of various physical nature [10]. One of the main approaches used to describe such processes is a synergetic approach based on the principles of self-organization. For example, in [10], in the framework of a non-equilibrium nonlinear statisticaldynamic model, it was shown that when the temperature is raised, due to self-organization effects, it is observed a transition from a mono crystalline to a rotational crystalline phase in organic molecular crystals. Here, damping of molecular vibrational excitons occurs on orientation defects of various types. This leads to the appearance of a temperature dependence of the Davydov splitting of molecular vibrations in the infrared absorption spectra of these crystals. In [11], in the framework of the synergetic model of Lorentz, there were considered the phenomena of self-organization of enterprises' activity under the influence of external stochastic and deterministic (discrete, sharp, extreme) changes of the factors of a nonlinear market environment. This approach allows us to correctly describe and predict the time series of the evolution of the enterprise under the influence of such changes.
As noted above, the ant algorithm is also based on the use of self-organization effects of the relevant agents. This makes it possible to use it to describe the corresponding non-equilibrium, non-stationary processes and phenomena, which, in particular, are observed when considering the actual dynamics of high density transport flows.
Indeed, in [12], based on an analysis of the corresponding experimental data obtained on highways in Germany, England and the United States, B. Kerner proposed the theory of three phases of the dynamics of a transport stream (free flow, synchronized flow, wide moving jam or congestion). This theory allows us to explain and predict empirical spatial and temporal dependences of phase transitions from free to dense (synchronized) flow and between resultant structures in a dense transport stream. Within the framework of this theory, it is considered that the observed effects of phase transitions, hysteresis of velocity changes at these transitions are due to the manifestation of synergistic effects as a result of the non-equilibrium non-stationary dynamics of transport flows in the region of their high density [13].
In [14], it is proposed a method for optimizing the transportation route based on the ant algorithm, taking into account the change in the speed of traffic flows in certain sections of the URN. However, in [14], during the optimization, the dynamics of the change on the speed of movement on the sections of the URN were not taken into account. There, at the time of route optimization those sections of the road network, where speed decreased significantly, were excluded from consideration.
The purpose of this work is to develop a method for constructing an optimal route for the delivery of goods on the basis of a modified ant algorithm [14], taking into account the actual dynamics of traffic flows on the URN of large cities.

Route optimization method using modified ant algorithm
For the development of the method for constructing the optimal route for the delivery of goods, we represent URN in the form of a two-way oriented weighted graph. At the nodes of such a graph, the delivery points of the goods (warehouses, supermarkets, etc.) from the sender's warehouse using a vehicle moving on the URN are located. The edges connect each pair of nodes of the graph. The weight of the edges is determined depending on the nature of the problem being solved. This can be the distance between points, the average speed or the average time, the cost of delivery by the vehicle in the transport flow on certain section of the network. Optimization of routes of movement of a vehicle is carried out with the help of the ant algorithm in the framework of the traveling salesman problem. This problem is formulated as a task of finding a minimal closed route along all the nodes which salesman visits without the repetition on a certain weighted graph with the number of vertices m [4]. Here, the optimization parameters can be the length of the route, the average speed or the average time, extra expenses on delivery of goods. For convenience, we assume that the exit and return of the vehicle can occur from any node in the graph. A description of the classical method of the ant algorithm is given in [4].
The solution of the routing problem, taking into account the actual behavior of the traffic flow, will be realized with the help of the modified ant algorithm [14]. We consider the dynamic two-way oriented weighted graph. The weights of the edges in this graph are determined by the average travel time of the vehicle in the traffic flow at certain sections of the network between the points of delivery (graph nodes). The fundamental difference between the modification of the algorithm [14] and the modifications of the ant algorithm [6][7][8] is that the cyclic movement of the colony, where the ants move at constant speeds, is replaced by the asynchronous movement of each ant agent at a certain rate. In addition, it is possible to fixate the results of optimization of the partially covered path for calculating the further route when the edge length of the graph changes during movement. This allows simulation of route optimization in conditions of actual dynamics of traffic flows on URN, where ant agents, like vehicles analogues, move with corresponding speeds.
The application of such a modified method of the ant algorithm is performed under the following assumptions: -the movement of a dedicated vehicle on all sections of the URN is carried out within the framework of a twoway traffic; -there are always alternative routes in each set of n jsections of URN, which corresponds to the j-th edge of the graph; -the change in the average travel time and average speed of movement is largely dependent on changes in the driving dynamics modes that do not include stops or delays due to traffic lights signals.
Each route between any two points within the metropolis has a number of alternatives. That is, it is possible to deliver goods from one point to another by several routes, which differ only in the length and average speed of the traffic flow on them. In our case, we assume that the average passage time along the n-th edge between the two nodes of the graph can be found as follows: where t n -the average time spent on passing the n-th edge, min; l n -the length of the n-th edge, km; υ n -average speed on the n-th edge, km/h. Since the value of the actual traffic flow rate on each road network can vary, then, respectively, the value of the passage time of the corresponding sections of the URN is also a variable value. Thus, when constructing the optimal time route of cargo delivery, the data on the actual state of the URN at the time of route construction is taken into account. At the same time, it is clear that at certain limit values of the traffic flow velocity on certain sections of the URN it is possible to reconstruct the optimal time route of the traffic on the URN vehicle for the delivery of goods at destination points.

Case study: Application of the method by the example of urn of Kyiv. Results of simulation research and discussion
For approbation of the proposed method of constructing the optimal route of cargo delivery, data on the distance between the points of delivery in Kyiv city (Fig. 1) and the average traffic velocities at the corresponding sections of the URN were used [15,16]. A fragment at the URN of Kyiv was presented as a two-way oriented weighted graph. The corresponding simulation researches on the construction of the optimal route were performed according to the proposed method, for the 10 nodes defining the points of delivery of the load. The average passage time for each section of the URN was based on the formula (1). The time taken to travel along the route and its length were selected for optimization parameters.

Construction of the optimal route for the delivery of cargo at the URN of Kyiv without taking into account the change in the speed of traffic flows
This section presents the results of simulation researches of the processes of constructing the optimal route provided that the average velocities are unchanged in the URN areas. At the same time, for calculations, data on the distance and average velocities in the regions of URN were used in accordance with [15,16]. The results of these calculations are shown in Fig. 2 for 10 nodes respectively. As can be seen from Fig. 2, various optimal routes are obtained depending on the optimization parameter. In case of optimization of the route according to the time of delivery of goods (Fig. 2, a) the length of the found route is 90 km. Time of the route is 110 minutes. In the case of route optimization along the route length (Fig. 2, b), its total length is 82 km, which is less than the previous by 8 km. The time of delivery of the cargo is 135 minutes, which is more than in the previous case by 25 minutes.
From the obtained results it can be seen that, depending on what is the optimization parameter, for the same initial data, in general, we get different delivery routes with different characteristics. Consequently, this causes, when making a managerial decision on the delivery of goods to its destinations, the need for a correct choice of the optimization parameter, depending on the objective (minimum time or minimum delivery route).
In order to verify the correctness of the use of the modified ant algorithm to solve the problems of finding the optimal route, given in this work, the test of optimization of the route for the same network with 10 nodes was performed with the help of the exhaustive search method, as well as the method of branches and boundaries [14]. The obtained results of research fully coincide with those obtained with the help of the corresponding ant algorithm.

Construction of the optimal route for the delivery of cargo at the URN of Kyiv, taking into account the real dynamics of traffic flows
In this section the results of simulation modeling on optimization of the route of cargo delivery in conditions close to the real dynamics of transport flows at the URN of Kyiv.
According to [12], for a qualitative description of the states of the dynamics of a traffic flow, three phases are considered: free flow, synchronized flow and wide moving jam. Depending on certain limit values of the traffic intensity, density, and average speed of the vehicles forming the flow, all possible states of the traffic flow are divided according to [12] into certain modes of motion.
When conducting research as an input parameter, the optimal route was selected obtained by performing the time optimization procedure for unchanged initial velocities on the edges taken from [15], for a graph with 10 nodes (Fig. 2, a). In addition, for uniqueness, it was considered that the average speed of traffic flows due to changes in traffic conditions can simultaneously be changed in three sections of the original optimal route (Fig. 2, a). For this purpose, the selected sites were between nodes 2-7, 10-8 and 4-3 (Fig. 3a, red lines). In the initial optimal route, the average speeds and time of traffic flow in these areas of the URN were 53 km/h and 2 min, 49 km/h and 9 min, 49 km/h and 20 min respectively. The mean free-flow speed of the traffic flow at the 2-7 URN site was 60 km/h. That is, it was limited to the maximum allowed velocity value in Kyiv. For sections 10-8 and 4-3 URN in Kyiv, the average freeflow speed of the traffic flow was 50 km/h. That is, it is limited to the corresponding road signs and [17].
The results of the simulation researches are shown in Fig. 3. Here are shown the stages of the route-optimized route formation after each iteration associated with the decrease in speed at the specified areas of the URN.
As can be seen from Fig. 3a inbound route is optimal over time, when free traffic of vehicles is carried out in three sections of the WDM in accordance with [12]. After the second iteration of optimization over time, when on the site 2-7 already occurs according to [12] synchronized flow, and on the other two there is a free flow of cars, reducing the speed at the relevant sites leads to the emergence of two alternative optimal routes (T = 112 min). The first of which corresponds to the input route. And the second one is transformed so that it changes the area of URN 2-7, on which the mode of movement of cars has changed (Fig. 3, b, c). In this case, the length of the route for the second alternative route is greater than for the incoming (95 km and 90 km, respectively). Obviously, when the time of passing the routes is the same, and the length of the route is different, more suitable route can be considered, the length of which is less. From this it follows that for the adoption of correct management decisions it is necessary to have full quantitative information on the results of optimization. The importance of having, above all, quantitative information about the state of the URN is further illustrated by the results of the optimization carried out during the fourth iteration. Here, on three sections of the URN, where the speed changes in accordance with [15,16], the same character of traffic flows associated with the synchronized flow of cars is observed qualitatively. However, the corresponding quantitative distribution of average velocities on all sections of the studied URN necessitates the restructuring of the optimal route after optimization (Fig. 3, d).
During the next, fifth iteration of optimization over time, the state of the URN will be answered, where at area 2-7 there is a movement of cars in the form of wide moving jam at low speed and with high probability of occurrence of a congestion [12], and on two other -the synchronized flow of cars. Here, such a reorganization of the route optimal is performed, when only one of three plots (area 10-8) remains in it. Here, in the framework of our model, the average speed of the traffic flow changes (Fig. 3, e, f). Accordingly, since the seventh optimization iteration, the optimal route formed already does not include these areas of the URN (Fig. 3g). Areas where the reduction of average speeds of transport streams on the URN reach values that correspond to the mode of occurrence of traffic jam on them. It is clear that further reductions in average speeds on them no longer lead to the restructuring of the optimal route (Fig. 3g).

Conclusions
The method is proposed of optimization of cargo delivery routes in large cities in the conditions of non-stationary dynamics of transport flows in the regions of URN. In the framework of this method, the network is represented as a two-way oriented weighted graph. The method is based on the use of a modified ant algorithm. The main element of the modification is that is realized the possibility of asynchronous movement of ant colony agents at a certain speed. In addition, it is also possible to record the results of optimization of the partly traversed path to calculate the further route when changing the conditions of movement of these agents. This allows you to manage the process of optimizing the route, taking into account the dynamic state of the URN, which is associated with significant changes in the speed of vehicles in certain areas of this network. These changes in speed can be due to increased loading of sites on URN, the occurrence of congestion, emergency situations, etc. The method allows to carry out the process of optimization both in time and length of the route. In order to verify the correctness of the use of the modified ant algorithm, tests were conducted to optimize the route along the length using the exhaustive search method and the method of branches and boundaries. The obtained results of research fully coincide with those obtained with the help of the modified ant algorithm.
To approbation the proposed method, research simulations of route optimization processes were carried out within the framework of the traveling salesman problem for the example of the URN of Kyiv. During the simulation were detected a number of effects. These effects are related to the restructuring of the optimal routes with a decrease in the average speeds of vehicles on model parts of the URN to certain limit values, which correspond to certain modes of movement of traffic flows. The analysis of the revealed effects allowed formulating some methodical recommendations for making managerial decisions on issues of rational organization of cargo transportation.
The analysis of the results of simulation researches gives grounds to consider that the proposed method allows to adequately optimization the routes of cargo delivery in the conditions of unsteady traffic flow on the URN of large cities. In the future, he can find his application in solving the problems of operational management of the transportation process in metropolitan areas. For example, the formation in the online mode of the best routes, taking into account the real traffic on the URN.
The results obtained in this way can be used to improve existing intelligent transport systems and technologies for traffic management at URN of megacities.