Научная статья на тему 'THE VEHICLE ROUTING PROBLEM IN URBAN ROAD NETWORKS'

THE VEHICLE ROUTING PROBLEM IN URBAN ROAD NETWORKS Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
46
12
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
VEHICLE ROUTING PROBLEM / TIME WINDOWS / VEHICLE CAPACITY / GENETIC ALGORITHM / K-MEANS / SPEED FACTOR HEAT MAP / FREIGHT FRAME OF ROAD NETWORK

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Vlasov A., Stanovskikh A.

The article presents an approach to solving the vehicle routing problem which is the basis of the Zig-Zag project, the purpose of which is to automate the logistics of freight transportation. The high efficiency of the proposed algorithm is due to the use of preliminary clustering of delivery points to determine geographical areas and the use of various heuristics to solve the optimization problem. Zig-Zag allows you to solve problems with time windows and restrictions on the vehicles capacity, and also takes into account the change in the speed of traffic flows depending on the time of day and road restrictions, using a heat map of the distribution of the speed coefficient obtained on the basis of statistical data.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «THE VEHICLE ROUTING PROBLEM IN URBAN ROAD NETWORKS»

MATHEMATICAL SCIENCES

THE VEHICLE ROUTING PROBLEM IN URBAN ROAD NETWORKS

Vlasov A.

Founder LLC «Zig-Zag» Stanovskikh A.

Co-founder LLC «Zig-Zag»

Abstract

The article presents an approach to solving the vehicle routing problem which is the basis of the Zig-Zag project, the purpose of which is to automate the logistics of freight transportation. The high efficiency of the proposed algorithm is due to the use of preliminary clustering of delivery points to determine geographical areas and the use of various heuristics to solve the optimization problem. Zig-Zag allows you to solve problems with time windows and restrictions on the vehicles capacity, and also takes into account the change in the speed of traffic flows depending on the time of day and road restrictions, using a heat map of the distribution of the speed coefficient obtained on the basis of statistical data.

Keywords: vehicle routing problem, time windows, vehicle capacity, genetic algorithm, k-means, speed factor heat map, freight frame of road network.

Introduction. In the modern world, the freight costs is a significant part of all logistics costs, so one of the main tasks of transport logistics is to determine the optimal route for cargo delivery in compliance with the existing restrictions and minimal costs. In the simplest case, the problem of finding the optimal route is reduced to the classic traveling salesman problem, which belongs to the class of NP-difficult problems, and even with a small number of points cannot be solved by a complete search in a reasonable time. Therefore, approximate methods and heuristics are used to solve it [1], and one of the best algorithms for solving the metric traveling salesman problem is Concorde [2, 3].

However, the classic travelling salesman problem is quite far from most of the logistical tasks encountered in practice. The generalization of the classic travelling salesman problem is vehicle routing problem [4], which refers to discrete optimization tasks and consists in determining a set of optimal routes for the existing fleet of vehicles at given delivery points and possible restrictions on the vehicle capacity, the desired delivery time (Time Windows), the presence of multiple depot, etc. [5]. Additional restrictions determine the specific type of routing task [6] and significantly complicate its solution. As the objective function of the optimization task, the length of the route, its duration or the monetary cost of delivery are selected. In any case, such a function is multi-extreme, so the direct application of gradient methods to minimize it is impossible. The most appropriate method is a genetic algorithm [6 - 8] with the appropriate implementation of genetic mutation and selection operators [9, 10]. And that's exactly what underlies the automation system of transport logistics ZigZag. In addition to additional restrictions specific to VRP tasks, the Zig-Zag system takes into account the change in the speed of traffic flow during the day on different sections of the road network, as well as restrictions on the movement of trucks in residential areas.

Pre-clustering. Large companies often have to solve routing problems in which there are tens to hundreds of vehicles and couriers and thousands of delivery points. With an increase in the dimension of the problem, its computational complexity increases exponentially, which is the main problem when using a genetic algorithm as an optimization method. A possible solution to this problem may be to apply the well-known "divide and conquer" principle to reduce the original task to several independent subtasks of smaller dimension. To do this, pre-clustering of delivery points is introduced into the solution of the vehicle routing problem, which makes it possible to form the traversal set of points for each individual courier and independently solve the resulting optimization problems.

The purpose of clustering is to divide some geographic area into a certain number of regions (clusters). To solve the clustering problem, the classic k-means algorithm is used, which works well and quickly with a large amount of data, but does not guarantee that the resulting clusters will be balanced by the number of points, area of the region or traversal time. Therefore, in the process of clustering, the balance of the clusters is additionally evaluated, and if the clusters are not sufficiently equal, they are adjusted by redistributing the boundary points. After that, their balance is checked again.

Clustering and assessment of its balance is carried out taking into account:

- the working schedule of couriers (start time of work, end time of work, lunch break);

- special courier skills;

- the vehicle capacity;

- the compatibility of the transported goods and special requirements for the type of transport (for example, a refrigerator is required for the transportation of frozen products);

- delivery point opening hours, weight and volume of cargo.

Fig. 1 Pre-clustering of delivery points

Step-by-step clustering with the assessment and adjustment of cluster balance can significantly simplify the routing vehicles problem, increasing the speed and efficiency of its solution. In Fig. 1 the result of the application of pre-clustering algorithm for the problem with 9 couriers and 106 delivery points for the road network of Moscow is presented.

Freight frame of the road network. In many cities, in order to reduce noise and air pollution, reduce the number of accidents and improve traffic in residential areas, the movement of trucks in residential areas is

limited, which must be taken into account when planning routes. In particular, a freight frame (Fig. 2) has been introduced in Moscow, consisting of roads on which free movement of freight transport is allowed. Along with it there is a residential area, the movement of trucks in which is limited, and the passage of trucks with a permissible maximum weight of more than 2.5 tons is allowed only for servicing enterprises or residents within the area, but for this it is necessary to have the appropriate permits.

Fig. 2. The current freight frame of Moscow roads

Thus, in addition, there is the task of marking the route, the algorithm can take into account the possibil-road network of the city, so that when planning the ity of the movement of specific vehicles on the selected

roads. This requirement is one of the necessary conditions for ensuring the correctness of the decision, and affects not only the choice of roads when forming the route, but also the choice of the optimal type of vehicle.

The Zig-Zag project uses road network markings based on OpenStreetMap data, customer data and the requirements of regulators such as Moscow Government Traffic Management Center. Marking of the freight frame consists in entering information into the transport network data that traffic is impossible between specific nodes of the road graph. When solving the problem of optimization route duration, the condition of impossibility of movement on a certain section is mathematically equivalent to the infinite transition time between the two corresponding vertices of the road graph. Thus, the main work on the task of the freight frame is preparing input data. After that, the algorithm independently recalculates the space-time matrix, taking into account information about the possibility or impossibility of movement. Such a matrix is determined for each type of transport (cars, trucks, public) and foot couriers.

The speed factor heat map. The speed of traffic on certain sections of the road network is limited by the requirements of traffic signs and surface markings. However, the specific values of the speed and travel time are significantly affected by the roads congestion, depending on the time of day, day of the week, weather conditions, etc. These factors must be taken into account in order for the resulting decision to be as close as possible to real conditions. Otherwise, the constructed route, which seems beautiful, fast and understandable, in practice turns out to be unusable. To solve this problem, the routing algorithm uses heat maps of the speed factor, which make it possible to correct the regulated speed values on each section of the route. The speed factor is the coefficient of proportionality between the maximum permitted speed on a selected section of road and the actual speed of traffic flow in each specific time interval. For example, in Moscow, in some sections of the Third Transport Ring, the maximum permitted speed is 60 km / h, while the real traffic speed on the same sections of the road in the evening can be less than 20-30 km / h. Thus, the speed factor for this section in the evening will be equal to the ratio of the real speed to the maximum, i.e. 0.3-0.5.

A heat map can be obtained in two fundamentally different ways:

- by the expert method, when the speed factor for each section and each point in time are determined by logistical experts based on their knowledge, experience and analysis;

- as a result of statistical processing of accumulated data on traffic congestion.

Both approaches are used in the presented algorithm. Based on the results of a survey of more than 100 logisticians-experts, a geographic model of Moscow region was formed, the most probable zones of traffic jam formation were identified and the initial approximations of the speed factors were determined. At the same time, based on the peculiarities of urban traffic and its dependence on time, 4 time intervals were allocated:

— "night hours" (from 19:00 to 08:00, at this time the city roads are most free);

— "morning rush hour" (from 08:00 to 10:00, the beginning of the working day, high traffic congestion);

— "daytime hours" (from 10:00 to 17:00, average traffic congestion);

_ "evening rush hour" (from 17:00 to 19:00, end of the working day, high traffic congestion).

Time zones are determined as a result of the analysis of OpenStreetMap - tracks and real tracks of the client companies of the Zig-Zag system collected on the server. Thus the space-time model of the city was built. These intervals were sufficient to calculate the optimal routes in most cases. It was found that increasing the number of time zones does not lead to an improvement in the quality of solutions to routing problems, the difference in the results of calculations was less than 5%.

For each time zone the heat map is a matrix, its elements determine the speed factors on specific sections of the roads of the transport network. In reality when moving from one time zone to another the change in the speed of the traffic flow does not occur abruptly but smoothly, so in the model the resulting value of the speed factors at each time is determined by interpolation for 4 available values.

Consider the algorithm for calculating heat maps and recalculating the vehicle speed depending on its type and time of day. Split the day on Nt discrete time intervals

T={(<i, tM )L,M,

and the urban transport network G on the Nz geographic zones

z = Z Uw, = G n j7i = 0 .

Let V = V} eo,Nv be many possible types of vehicles and P ' <^>,Np be the sets of delivery points for each vehicle.

Suppose you know the distance matrix between each pair of vertices of the road graph obtained for an

ideal situation on the roads with no traffic jams Dj = p(p„ pj)

and the corresponding time matrix

is Tij ' . Then the matrix of the speed of the

transport flow under ideal conditions can be obtained as:

p(p11_pj) T p Pj) '

To take into account the possibility of traffic congestion and their impact on the solution to the routing

problem a global coefficient

Cg

set by the expert

method was introduced.

To determine the speed, depending on the type of transport, we introduce coefficients

cV , v ^{foo^ car hgv}= V,t G! where foot, car, hgv denote foot, road, truck transport, respectively. We will also introduce the speed factors

Czzjt, zizj GZ,t obtained by the expert

S 0

method for transitions between different geographic zones.

Then the desired real speed matrices will be calculated according to the following formula

yt eT\ V GF Stv = CgCVCZ _ S0, Z ..

' ij vt ZpiZpj^ ij ? pi

An interpolation algorithm is used for smoothly speed changing during the transition between time intervals, Heat maps of speed factors are matrices of

CZj, zizj GZ't GT values defined for each time interval and for each section of the roads of the transport network.

An important feature of the Zig-Zag system is the possibility of its continuous training based on accumulated statistics, as well as on the basis of open data from other systems, for example, Yandex. The speed coefficients for individual sections of roads, the boundaries of the most problematic areas and time zones are adjusted in the process of training the system.

Due to the complexity of the city's transport system, the peculiarities of the operation of delivery points and the possibility of force majeure (accidents, a sudden change in weather conditions), the error in assessing routes according to the algorithm used may be unstable. However, even taking this into account, the average error in determining the speed does not exceed

10% and in 80 percent of cases time deviations from the planned routes are less than 5 minutes.

Results. The main calculation module of the ZigZag system is based on the application of a genetic al-pgorithm to solve the routing problem for each individual vehicle or foot courier at the corresponding set of delivery points obtained after preliminary clustering. The VRP is a discrete optimization problem, and each individual of the genetic algorithm is some ordered sequence of route points. The objective function of the genetic algorithm, which characterizes the fitness of individuals, determines the traversal time, taking into account possible penalties for violation of the conditions and restrictions on the time of delivery, the vehicle capacity, etc.

The algorithm implemented in the system allows you to simultaneously solve the problems of optimization of transport logistics for several customers at once with hundreds of vehicles or foot couriers and thousands of delivery points in a reasonable time. For example for 20 vehicles and 1000 delivery points the solution of the routing problem takes less than 5 minutes.

Consider the result of solving the problem presented in Fig. 1. In this task there are 7 couriers and 106 delivery points, and it is necessary to deliver the entire cargo within one working shift in the conditions of the road network in Moscow. All 7 routes built are presented in Fig. 3.

Fig. 3. The solution of the routing problem

The Zig-Zag system allows you to display the arrival time and distances separately for each courier route and the corresponding route sheet with addresses, (Fig. 4).

Fig. 4. The optimal route and the corresponding route sheet for one of the couriers

An example of a complete route sheet for the courier №2 shown in Table 1. According to the condition of the task, the route of each courier must begin and end at the depot, so each route is built taking into account

Courier №2

this condition, and the depot is the first and last point of each route. However not in all transport tasks the condition of return to the depot is mandatory, therefore if necessary the task can be solved without it.

Table 1.

route sheet

№ Delivery point address Estimated arrival Estimated departure Total time Total length

Depot Moscow, Lenina, 6 00:00 00:00 00:00 0.00

1 Moscow, Troitsk, 40-km Kaluga highway. 02:41 07:30 07:30 145.75

2 Moscow region, Naro-Fominsk district, Naro-Fominsk city, 71 km of Kiev highway st. 08:20 08:50 08:50 191.32

3 Moscow region, Naro-Fominsk district, Naro-Fominsk city, 72 km of Kiev highway st. 08:52 08:52 08:52 192.32

4 Moscow region, Naro-Fominsk district, Moscow region, 44km + 300m of Kievskoe highway 09:23 09:53 09:53 211.14

5 Moscow region, Odintsovsky district, Moscow region, Minsk highway 64 km 10:41 11:11 11:11 253.24

6 Moscow region, Odintsovsky district, 64 km of the Moscow Ring Road 11:42 12:12 12:12 274.51

7 Moscow region, M-2, 31 km, left 12:41 13:11 13:11 293.30

8 Moscow region, Odintsovo district, Odintsovo city, South street, 13:29 13:59 13:59 311.32

9 Moscow region, Odintsovo district, Odintsovo city, Mozhayskoye sh. 14:05 14:35 14:35 314.28

10 Moscow region, Krasnogorsk district, Kras-nogorsk city, Volokolamsk highway, 27 km 15:12 15:42 15:42 344.59

11 Moscow region, Khimki city, International highway, 1A, 16:18 16:48 16:48 372.05

12 Moscow region, Dolgoprudny city, Paveltsevo microdistrict, Novoe sh, 30B 16:55 17:25 17:25 376.22

13 Moscow region, Khimki city, 31km a / d Moscow-St. Petersburg, vl 1 17:43 18:13 18:13 387.99

14 Moscow region, Solnechnogorsk district, Moscow region, Durykino d 18:35 19:05 19:05 405.62

15 Moscow region, Zelenograd city, Pine alley, 1 19:21 19:51 19:51 417.41

Depot Moscow, Lenina, 6 22:20 22:20 22:20 551.61

Conclusion. The algorithm for the vehicle routing problem given their carrying capacity, the time windows and the assessment of the traffic situation, presented in the paper, is the basis of the Zig-Zag transport logistics automation system. An important feature of the Zig-Zag system is the possibility of its continuous training on the basis of constantly accumulated statistics on the results of previously completed routes. Considering the features of the urban road network (and in particular the freight frame) and the use of a heat map of speed coefficients to adapt the system to real conditions allows you to successfully build logistics routes with an error in determining the speed is less than 10% and deviations in time less than 5 minutes from the predicted values. You can get acquainted with the functional features of the system and the basic methods of working with it on the website https://zig-zag.org/.

REFERENCES:

1. Nicos Christofides, Worst-case analysis of a new heuristic for the travelling salesman problem, Report 388, Graduate School of Industrial Administration, CMU, 1976.

2. Applegate, D.L., Bixby, R.B., Chav'atal, V., and Cook, W.J. The Traveling Salesman Problem: A Computational Study. Princeton University Press, 2006.

3. Pouya Baniasadi, Vladimir Ejov, Michael Haythorpe, and Serguei Rossomakhine. A new benchmark set for Traveling salesman problem and Hamilto-nian cycle problem. 2018.

4. Dantzig G.B., Ramser J.H. The truck dispatching problem. Management Science, 1959, vol. 6, no. 1, pp. 80-91. DOI: 10.1287/mnsc.6.1.80.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

5. Kubil V.N. A review of the vehicle routing problem generalizations and extensions. Vestn. RGUPS, 2018, vol. 70, no. 2, pp. 97-109.

6. Barkaoui M., Gendreau M. An adaptive evolutionary approach for real-time vehicle routing and dispatching. Computers & Operations Research, 2013, vol. 40, no. 7, pp. 1766-1776. DOI: 10.1016/j.cor.2013. 01.022.

7. Xu H., Duan F.Y., Pu P. Solving dynamic vehicle routing problem using enhanced genetic algorithm with penalty factors. Int. J. of Performability Eng., 2018, vol. 14, no. 4, pp. 611-620. DOI: 10.23940/ijpe.18.04. p3.611620.

8. Sabar N.R., Bhaskar A., Chung E., Turky A., Song A. A self-adaptive evolutionary algorithm for dynamic vehicle routing problems with traffic congestion. Swarm and Evolutionary Computation, 2019, vol. 44, pp. 1018-1027. DOI: 10.1016/j.swevo.2018.10.015.

9. Abdoun Otman, Jaafar Abouchabaka, Chakir Tajani. Analyzing the Performance of Mutation Operators to Solve the Travelling Salesman Problem. Int. J. Emerg. Sci.. 2. 2012.

10. Batishchev D. I., Neymark Ye. A., Starostin N. V. Primeneniye geneticheskikh algoritmov k resh-eniyu zadach diskretnoy optimizatsii [Application of genetic algorithms to solving discrete optimization problems]. Nizhny Novgorod, 2007, 88 p. (in Russ.).

i Надоели баннеры? Вы всегда можете отключить рекламу.