Abstract
This work shows the application of the Capacitated Vehicle Routing Problem with Time Windows (CVRPTW) to collect different cargo-demand in several locations with low time disponibility to attend any vehicle. The objective of the model is to reduce the routing time in a problem with mixed vehicle-fleet. The initial step is the creation of a distance matrix by using the Google Maps API, then cargo capacities for every vehicle and time-windows for every demand point are included in the model. The problem is solved with Google-OR tools using as firt solution aproximated algoritm and as second solution one metaheuristic algorithm for local search.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Planning and managing transportation activities plays a fundamental role in the modern supply chain. Two categories are well known to address the problem, those who are related to long-distance cargo transport and other related with pick-up and delivery of packages in short distances [16]. The first category consists most of the cases in assignment related formulations with linear restrictions. By the other hand, the initial formulation of vehicle routing problems is proposed by Dantzing & Ramser as a generalisation of Flood’s travelling salesman problem [13] in their work [11] proposed a matching-based heuristic for its solution. The vehicle routing problem objective is finding the best routes for delivery minimising a linear cost function over a set of nodes or clients, usually diverse and disperse forming an integer and combinatorial optimisation-problem. Years later, several heuristic solutions to VRP problem appeared including, savings, proximity, matchings, and intra-route inter-route improvement [20]. The most prominent savings algorithm is the Clarke and Wright savings heuristic, it has remained until now, due to its simplicity and speed for implementation [10]. Exact solution algorithms appear in the 80’s whit two works proposed by Chistofides et al. the first one is a dynamic programming formulation [8] and the second one a mathematical programming formulation making use of q-paths and k-shortest spanning trees [9]. Later, Laporte et al. propose a VRP algorithm based on the solution of linear relaxation of an integer model [19]. Since then, several exact formulations appear but in most cases are solved by branch-and-cut. Also, its posible to formulate VRP as a partitioning problem like the successfull applications [5, 14]. Modern heuristic development is related to the last years, here we highlight the works in tabu search based algorithms [15, 28, 32]. According with [20] vehicle some algorithms were over-engineered and the best meta-heuristic procedure must have a broad and in-depth search of the solution space and can solve several variants of the problem [23]. This work addresses the problem of a classical formulation of capacitated vehicle routing problem with time windows; the case study refers to a cargo company who have to pick packages in 25 locations or nodes. They also count on 13 vehicles with different capacity. The capacity of the vehicles and the demand show kg as cargo units. The structure of the paper show first a short literature review about the CVRPTW and some applications in a similar context in Colombia, later presents de methodological approach and the model design including mathematical formulation, software and hardware used for solve the model. Finally, shows the results and a short discussion about the benefits and difficulties of this approach to solve CVRTW. The main contribution of this article is to show how a complex problem such as CVRPTW can be solved efficiently and simply, allowing the use of different vehicle capacities, which in the classical formulation is not easy to handle.
2 Literature Review
In this item, the work shows relevant and similar applications of vehicle routing problems in Colombia. As designed, the VRP applications solve instance for develope routes in short-haul transport; the particular characteristics of urban development in Colombia, do not allow parking on the street for a long time and also presents demand points without cargo bays. Along whit, present themselves the recurrent issues in cargo transportation as traffic, road maintenance, new works, small roads, among others. The incremental relevance of the CVRPTW in academic literature shows a rise of publications in this problem among last years, from a search in Scopus®. The results show 1429 documents only in the maim formulation over CVRP; including the time windows restrictions, the number of documents in Scopus® gives 722 document results (Fig. 1).
In Colombia the CVRP and his generalization CVRPTW aplies in many contexts, but in litterature can be highligted the works in collection of food donations [4], also in distribution patterns [7] and school bus routing [26]; also there are interesting works applied in other simmilar countries for pharmaceutical distribution [18]. From the same search in Scopus, notice that there are 10 Documents, 6 original articles and 4 proceedings since 2015 [3, 6, 12, 17, 21, 22, 24, 25, 27, 29].
3 The CVRPTW Model Design
The family of VRP models and his study is extensive. The most study model in their taxonomy is the capacitated vehicle routing problem CVRP; the time windows restrictions form a generalisation of this model named VRPTW. The approximation in this work includes the capacity and time windows constraints simultaneously. Fist, we describe and show the mathematical formulation of the model, later also present the solution algorithms and tools to solve the problem.
3.1 Mathematical Formulation to CVRPTW
The mathematical formulation for modelling CVRPTW shows as follows and its described according [30, 31, 33].
subject to
The objective function 1 refers to minimize the total cost expressed like distance units in the distance matrix. Constraints 2 restric the assignment of each customer to exactly one vehicle route. Next, constraints 3–5 characterize the flow on the path to be followed by vehicle k. Additionally, constraints 6–8 and 9 guarantee schedule feasibility with respect to time considerations and capacity aspects, respectively. Note that for a given k, constraints 7 force \(W_{ik} \)= 0 whenever customer i is not visited by vehicle k. Finally, conditions 11 impose binary conditions on the flow variables.
3.2 Solution Method
-
googleDistance Matrix API: The CVRPTW is solved using google maps distance matrix API [1], and for solve the algorithm this work use google or-tools [2] for developers.
-
googleORTools: OR-Tools is open source software for combinatorial optimization, which seeks to find the best solution to a problem out of a very large set of possible solutions.
-
Routing Options: Time spend in every search of 100 s, fist solution strategy cheapest insertion, local search objective tabu search.
-
IDE: IPython/Jupyter notebooks.
The distance matrix \(C_{ij}\) is created by calling google maps distance matrix API, with units as distance in meters using the directions for every client from the Table 1 and represented in the Fig. 2.
Each client has different demands, the entire fleet is available, but they have different cargo capacity. The first module for the main program developed in python 3.0 is the data creation module, as we say before we use the google distance matrix API, then we add time window constraints with an initial time at 2:00 pm.
The time windows data is a set of pairs with initial time and final time for each time window in every pair into the set.
The vehicle capacities are added as another set of data in the first module of data creation. The second module calculates the distance between directions using the distance matrix created before.
The velocity for every truck is added as a mean velocity for vehicles at the day in Bogota, Colombia (25 km/h). An exciting and useful characteristic of the Google API is the possibility of getting the distance matrix data in real time.
All vehicle capacities must be greater than the sum of every demand nodes. Otherwise, the problem has no feasible solution. The use of heuristics helps to find a feasible (but not always the best) solution with faster development in the time of execution for the algorithm previously selected. The imput information for the first module of data creation in our program is Table 3
The CVPTW presents in each node a time window expressed as the initial time \(i_{t}\) and the final time \(f_{t}\) when a truck can visit a demand node at a time \(v_{t}\) as we show as follows (Table 2):
The vehicle routing problem with time-windows (CVRPTW) reffers to: As can bee seen in the Fig. 3 a fleet of shipping cars with uniform capability must serve clients with known demand and opening hours for a single commodity. At a D depot node, the cars begin and end their paths. Only one car can serve each client. The goals are to minimize the fleet size and assign a sequence of customers to each fleet truck minimizing the total distance traveled so that all customers are served and the total demand served by each truck does not exceed its capacity. The time windows are represented as the time interval vt from it to ft in which each customer can receive deliveries (Table 4).
4 Results
The solution of the problem was performed using the algorithm of Objective tabu search and includes time window constraints and capacity constraints simultaneously. The performance of the algorithm was measured, given a solution at a time execution of 0.09 s.
The routes for the Trucks contains load in every node, total time and total distance for each. The total distance for every route was 10044 m, the total time of every route was 2174 min, but the more significant time for every rout was 333 min for truck number 4039. Also, we can plot every route, as can see the first two of them as follows:
As can be seen in Table 5a it is possible to obtain the routes of each vehicle where the first row shows the route that each vehicle must follow starting from the deposit and returning to it.
The second row shows the load collected at each point, rows 3 and 4 show the total load collected by each vehicle and the total route time (Figs. 4 and figura4).
5 Conclusions
The use of google optimization tools allows to solve optimization and metaheuristic problems efficiently and also allows its integration with visualization tools such as google maps for a better understanding of the results.
The routing problem in a real case for a Bogota company is solved by reducing the delivery time and the fleet required to carry out the cargo collections.
The biggest contribution of google tools in this case is the possibility of changing the loading capacity of trucks in a simple way.
The solution time is very efficient, achieving a response in a short time for a complex metaheuristic problem.
The company do not need 6 trucks of 13; the demand is satisfied with 7 trucks as it was described in the last item. The model provides dynamic planning for delivery routes using a heterogeneous capacity fleet.
Future research can include machine learning algorithms to add human preference behaviour to chose how to accomplish the routes, including perception aspects like security or comfort.
References
Clients map - google’s maps api. https://drive.google.com/open?id=1_MxV75hs_qlFENsXIhh0HJDYZkcu7pJ-&usp=sharing
Google’s or-tools. https://developers.google.com/optimization/
Aguirre-Gonzalez, E., Villegas, J.: A two-phase heuristic for the collection of waste animal tissue in a colombian rendering company. Commun. Comput. Inf. Sci. 742, 511–521 (2017)
Arenas, I.G.P., Sánchez, A.G., Armando, C., Solano, L., Medina, L.B.R.: Cvrptw model applied to the collection of food donations
Baldacci, R., Christofides, N., Mingozzi, A.: An exact algorithm for the vehicle routing problem based on the set partitioning formulation with additional cuts. Math. Program. 115(2), 351–385 (2008)
Bernal, J., Escobar, J., Paz, J., Linfati, R., Gatica, G.: A probabilistic granular tabu search for the distance constrained capacitated vehicle routing problem. Int. J. Ind. Syst. Eng. 29(4), 453–477 (2018)
Carrillo, M., Felipe, A.: Modelo de ruteo de vehículos para la distribución de las empresas laboratorios veterland, Laboratorios Callbest y Cosméticos Marlioü París. B.S. thesis, Facultad de Ingeniería (2014)
Christofides, N., Mingozzi, A., Toth, P.: Exact algorithms for the vehicle routing problem, based on spanning tree and shortest path relaxations. Math. Program. 20(1), 255–282 (1981)
Christofides, N., Mingozzi, A., Toth, P.: State-space relaxation procedures for the computation of bounds to routing problems. Networks 11(2), 145–164 (1981)
Clarke, G., Wright, J.W.: Scheduling of vehicles from a central depot to a number of delivery points. Oper. Res. 12(4), 568–581 (1964)
Dantzig, G.B., Ramser, J.H.: The truck dispatching problem. Manag. Sci. 6(1), 80–91 (1959)
Escobar-Falcon, L., Alvarez-Martinez, D., Granada-Echeverri, M., Willmer-Escobar, J., Romero-Lazaro, R.: A matheuristic algorithm for the three-dimensional loading capacitated vehicle routing problem (3l-cvrp). Rev. Fac. de Ing. 2016(78), 9–20 (2016)
Flood, M.M.: The traveling-salesman problem. Oper. Res. 4(1), 61–75 (1956)
Fukasawa, R., Longo, H., Lysgaard, J., de Aragão, M.P., Reis, M., Uchoa, E., Werneck, R.F.: Robust branch-and-cut-and-price for the capacitated vehicle routing problem. Math. Program. 106(3), 491–511 (2006)
Gendreau, M., Hertz, A., Laporte, G.: A tabu search heuristic for the vehicle routing problem. Manag. Sci. 40(10), 1276–1290 (1994)
Ghiani, G., Laporte, G., Musmanno, R.: Introduction to Logistics Systems Planning and Control. John Wiley & Sons, Hoboken (2004)
Herazo-Padilla, N., Montoya-Torres, J., Nieto Isaza, S., Alvarado-Valencia, J.: Simulation-optimization approach for the stochastic location-routing problem. J. Simul. 9(4), 296–311 (2015)
Jacobo-Cabrera, M., Caballero-Morales, S.-O., Martínez-Flores, J.-L., Cano-Olivos, P.: Decision model for the pharmaceutical distribution of insulin. In: Florez, H., Diaz, C., Chavarriaga, J. (eds.) ICAI 2018. CCIS, vol. 942, pp. 75–89. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-01535-0_6
Laporte, G., Desrochers, M., Nobert, Y.: Two exact algorithms for the distance-constrained vehicle routing problem. Networks 14(1), 161–172 (1984)
Laporte, G., Toth, P., Vigo, D.: Vehicle routing: historical perspective and recent contributions (2013)
Lenis, S., Rivera, J.: A metaheuristic approach for the cumulative capacitated arc routing problem. Commun. Comput. Inf. Sci. 916, 96–107 (2018)
Lopez-Santana, E., Mendez-Giraldo, G., Franco-Franco, C.: A hybrid scatter search algorithm to solve the capacitated arc routing problem with refill points. Lect. Notes Comput. Sci. (including Subseries Lect. Notes Artif. Intell. Lect. Notes Bioinform.) 9772, 3–15 (2016)
Pisinger, D., Ropke, S.: A general heuristic for vehicle routing problems. Comput. Oper. Res. 34(8), 2403–2435 (2007)
Quintero-Araujo, C., Bernaus, A., Juan, A., Travesset-Baro, O., Jozefowiez, N.: Planning freight delivery routes in mountainous regions. Lect. Notes Bus. Inf. Process. 254, 123–132 (2016)
Rivera, J., Murat Afsar, H., Prins, C.: Mathematical formulations and exact algorithm for the multitrip cumulative capacitated single-vehicle routing problem. Eur. J. Oper. Res. 249(1), 93–104 (2016)
Santana, L., Ramiro, E., Carvajal, J.D.J.: A hybrid column generation and clustering approach to the school bus routing problem with time windows. Ingeniería 20(1), 101–117 (2015)
Solano-Charris, E., Prins, C., Santos, A.: Local search based metaheuristics for the robust vehicle routing problem with discrete scenarios. Appl. Soft Comput. J. 32, 518–531 (2015)
Taillard, É.: Parallel iterative search methods for vehicle routing problems. Networks 23(8), 661–673 (1993)
Toro, E., Franco, J., Echeverri, M., Guimaraes, F.: A multi-objective model for the green capacitated location-routing problem considering environmental impact. Comput. Ind. Eng. 110, 114–125 (2017)
Toth, P., Vigo, D.: Models, relaxations and exact approaches for the capacitated vehicle routing problem. Dis. Appl. Math. 123(1–3), 487–512 (2002)
Toth, P., Vigo, D.: The Vehicle Routing Problem. SIAM, Philadelphia (2002)
Toth, P., Vigo, D.: The granular tabu search and its application to the vehicle-routing problem. Informs J. Comput. 15(4), 333–346 (2003)
Toth, P., Vigo, D.: Vehicle Routing: Problems, Methods, and Applications. SIAM, Philadelphia (2014)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Romero-Gelvez, J.I., Gonzales-Cogua, W.C., Herrera-Cuartas, J.A. (2019). CVRPTW Model for Cargo Collection with Heterogeneous Capacity-Fleet. In: Florez, H., Leon, M., Diaz-Nafria, J., Belli, S. (eds) Applied Informatics. ICAI 2019. Communications in Computer and Information Science, vol 1051. Springer, Cham. https://doi.org/10.1007/978-3-030-32475-9_13
Download citation
DOI: https://doi.org/10.1007/978-3-030-32475-9_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-32474-2
Online ISBN: 978-3-030-32475-9
eBook Packages: Computer ScienceComputer Science (R0)