A Genetic Algorithm for the Waitable Time-Varying Multi-Depot Green Vehicle Routing Problem
Abstract
:1. Introduction
- Considering that the real road conditions are always changing, a waiting mechanism is introduced to allow vehicles to wait at some nodes to optimize the vehicle path.
- A dual-layer genetic algorithm is developed to solve the proposed problem, and the advantages of neighborhood search and simulated annealing are introduced to make the algorithm more effective.
2. Related Work
2.1. Time-Dependent Vehicle Routing Problem, TDVRP
2.2. Multi-Depot Vehicle Route Problem, MDVRP
2.3. Waiting Vehicle Routing Problem, WVRP
3. Problem and Mathematical Model
3.1. Problem Definition
3.2. Fuel Consumption
- 1.
- In the first case, the moment of arrival at node j remains in the interval , which in this case means that the distance traveled by the vehicle during the time from to is greater than the distance from node i to node j, i.e., . Then, find the moment of arrival at node j according to the Equation (6).
- 2.
- The other case is the opposite of the above, . In this case, the time of arrival at node j and the time of departure from node i will not be in the same time interval. Thus, it is necessary to cross the time slot and reach node j in the next time slot. Then, find the moment of arrival at node j according to the Equation (7).
3.3. Mathematical Model
4. Algorithm Description
4.1. Customer Clustering
4.1.1. Temporal-Spatial Distance
- 1.
- The first case is when one set is larger than the other, which means that the maximum value in one set is smaller than the minimum value in the other set. The maximum value b is smaller than the earliest arrival time in time window of node j, as shown in Figure 3, indicating starting from node i will inevitably arrive at node j in advance. Then, the time distance between node i and node j is .
- 2.
- The second case is where one set is smaller than the other; that is, the minimum value of one set is larger than the maximum value of the other set. Here, it represents the minimum value a is greater than the latest arrival time , as shown in Figure 4. This indicates that it is necessarily late from node i to node j. Then, the time distance between node i and node j is .
- 3.
- The third case is where the two sets have intersecting parts. It signifies the relationship between the time interval = [a,b] and the time window of node j: or , as shown in Figure 5. Then, the spatial distance between node i and node j in this case is .
- 4.
- The last case is the best case, where one set contains another set. It means that , which implies that the time when the vehicle starts from node i and arrives at node j must be in the time window of node j, as shown in Figure 6. The time distance in this case is .
4.1.2. K-Medoids Clustering Algorithm
4.2. Outer Layer Genetic Algorithm
Algorithm 1: Dual-layer genetic algorithm |
Require: Out_pop_size: Outer layer population size Require: Out_max_iter: Outer layer maximum number of iterations Require: Inner_max_iter: Inner layer maximum number of iterations Require: Inner_pop_size: Inner layer population size Require:: neighborhood structure is the mth neighborhood structure
|
4.2.1. Encode and Decode
4.2.2. Crossover
4.2.3. Local Search
- 1.
- Neighborhood structure
- (a)
- ExchangeArbitrarily select two customer points i and j, and then swap the positions of the two. As shown in Figure 10.
- (b)
- InsertSelect two customer points i and j randomly and insert customer point i after the customer point. As shown in Figure 11.
- (c)
- 2-optArbitrarily select two client points i and j, and then invert the interval between these two points. As shown in Figure 12.
- 2.
- Solution acceptanceThis study used an acceptance mechanism similar to simulated annealing to prevent the algorithm from falling into local optima while expanding the search space. If the solution after the neighborhood is better adapted than the itself, then it is replaced. Otherwise, the worse solution is accepted according to a certain probability. The solution acceptance formula is shown in Equation (24). Here, refers to the current chromosome fitness, where is the chromosome fitness after the neighborhood, fitness is obtained using an inner-layer genetic algorithm, and iter is the number of current iterations.
4.2.4. Select Operation
4.3. Inner Layer Genetic Algorithm
4.3.1. Encode and Decode
4.3.2. Crossover and Mutation
5. Experiment
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- De, A.; Mamanduru, V.K.R.; Gunasekaran, A.; Subramanian, N.; Tiwari, M.K. Composite particle algorithm for sustainable integrated dynamic ship routing and scheduling optimization. Comput. Ind. Eng. 2016, 96, 201–215. [Google Scholar] [CrossRef]
- De, A.; Gorton, M.; Hubbard, C.; Aditjandra, P. Optimization model for sustainable food supply chains: An application to Norwegian salmon. Transp. Res. Part Logist. Transp. Rev. 2022, 161, 102723. [Google Scholar] [CrossRef]
- Wu, Z.; Gao, Q.; Jiang, B.; Karimi, H.R. Solving the production transportation problem via a deterministic annealing neural network method. Appl. Math. Comput. 2021, 411, 126518. [Google Scholar] [CrossRef]
- Hardcastle, J. Walmart, General Mills, Anheuser-Busch improve freight efficiency, cut emissions. Environ. Lead. 2015. Available online: http://www.en-vironmentalleader.com/2015/05/13/walmart-general-mills-anheuser-busch-improve-freight-efficiency-cut-emissions/#ixzz473YFXy9e (accessed on 13 May 2015).
- Wu, Z.; Karimi, H.R.; Dang, C. A deterministic annealing neural network algorithm for the minimum concave cost transportation problem. IEEE Trans. Neural Netw. Learn. Syst. 2019, 31, 4354–4366. [Google Scholar] [CrossRef]
- Namasudra, S.; Sharma, P. Achieving a decentralized and secure cab sharing system using blockchain technology. IEEE Trans. Intell. Transp. Syst. 2022, 1–10. [Google Scholar] [CrossRef]
- Pan, J.S.; Lv, J.X.; Yan, L.J.; Weng, S.W.; Chu, S.C.; Xue, J.K. Golden eagle optimizer with double learning strategies for 3D path planning of UAV in power inspection. Math. Comput. Simul. 2022, 193, 509–532. [Google Scholar] [CrossRef]
- Li, Z.; Miao, Q.; Chaudhry, S.A.; Chen, C.M. A provably secure and lightweight mutual authentication protocol in fog-enabled social Internet of vehicles. Int. J. Distrib. Sens. Netw. 2022, 18, 15501329221104332. [Google Scholar] [CrossRef]
- Rezaei, N.; Ebrahimnejad, S.; Moosavi, A.; Nikfarjam, A. A green vehicle routing problem with time windows considering the heterogeneous fleet of vehicles: Two metaheuristic algorithms. Eur. J. Ind. Eng. 2019, 13, 507–535. [Google Scholar] [CrossRef]
- Liu, C.; Kou, G.; Zhou, X.; Peng, Y.; Sheng, H.; Alsaadi, F.E. Time-dependent vehicle routing problem with time windows of city logistics with a congestion avoidance approach. Knowl.-Based Syst. 2020, 188, 104813. [Google Scholar] [CrossRef]
- Xiao, Y.; Konak, A. The heterogeneous green vehicle routing and scheduling problem with time-varying traffic congestion. Transp. Res. Part E Logist. Transp. Rev. 2016, 88, 146–166. [Google Scholar] [CrossRef]
- Bektaş, T.; Laporte, G. The Pollution-Routing Problem. Transp. Res. Part B Methodol. 2011, 45, 1232–1250. [Google Scholar] [CrossRef]
- Kuo, Y.; Wang, C.C.; Chuang, P.Y. Optimizing goods assignment and the vehicle routing problem with time-dependent travel speeds. Comput. Ind. Eng. 2009, 57, 1385–1392. [Google Scholar] [CrossRef]
- Ichoua, S.; Gendreau, M.; Potvin, J.Y. Vehicle dispatching with time-dependent travel times. Eur. J. Oper. Res. 2003, 144, 379–396. [Google Scholar] [CrossRef] [Green Version]
- Mu, D.; Wang, C.; Wang, S.; Zhou, S. Solving TDVRP based on a parallel-simulated annealing algorithm. Comput. Integr. Manuf. Syst. 2015, 21, 1626–1636. [Google Scholar] [CrossRef]
- Ma, X.; Liao, L.; Li, Z.; Lai, R.X.; Zhang, M. Applying Federated Learning in Software-Defined Networks: A Survey. Symmetry 2022, 14, 195. [Google Scholar] [CrossRef]
- De, A.; Wang, J.; Tiwari, M.K. Hybridizing Basic Variable Neighborhood Search With Particle Swarm Optimization for Solving Sustainable Ship Routing and Bunker Management Problem. IEEE Trans. Intell. Transp. Syst. 2020, 21, 986–997. [Google Scholar] [CrossRef]
- Beasley, J. Adapting the savings algorithm for varying inter-customer travel times. Omega 1981, 9, 658–659. [Google Scholar] [CrossRef]
- Wright, G. Scheduling of Vehicles from a Central Depot to a Number of Delivery Points. Oper. Res. 1964, 12, 568–581. [Google Scholar] [CrossRef]
- Hill, A.V.; Benton, W.C. Modelling Intra-City Time-Dependent Travel Speeds for Vehicle Scheduling Problems. J. Oper. Res. Soc. 1992, 43, 343–351. [Google Scholar] [CrossRef]
- Horn, M.E.T. Efficient modeling of travel in networks with time-varying link speeds. Networks 2015, 36, 80–90. [Google Scholar] [CrossRef]
- Jie, K.W.; Liu, S.Y.; Sun, X.J. A hybrid algorithm for time-dependent vehicle routing problem with soft time windows and stochastic factors. Eng. Appl. Artif. Intell. 2022, 109, 104606. [Google Scholar] [CrossRef]
- Bai, Q.; Yin, X.; Lim, M.K.; Dong, C. Low-carbon VRP for cold chain logistics considering real-time traffic conditions in the road network. Ind. Manag. Data Syst. 2022, 122, 521–543. [Google Scholar] [CrossRef]
- Tillman, F.A. The Multiple Terminal Delivery Problem with Probabilistic Demands. Transp. Sci. 1969, 3, 192–204. [Google Scholar] [CrossRef]
- Wren, A.; Holliday, A. Computer Scheduling of Vehicles from One or More Depots to a Number of Delivery Points. J. Oper. Res. Soc. 1972, 23, 333–344. [Google Scholar] [CrossRef]
- Raft, O.M. A modular algorithm for an extended vehicle scheduling problem. Eur. J. Oper. Res. 1982, 11, 67–76. [Google Scholar] [CrossRef]
- Hesam Sadati, M.E.; Çatay, B.; Aksen, D. An efficient variable neighborhood search with tabu shaking for a class of multi-depot vehicle routing problems. Comput. Oper. Res. 2021, 133, 105269. [Google Scholar] [CrossRef]
- Lim, A.; Fan, W. Multi-depot vehicle routing problem: A one-stage approach. IEEE Trans. Autom. Sci. Eng. 2005, 2, 397–402. [Google Scholar] [CrossRef]
- Gulczynski, D.; Golden, B.; Wasil, E. The multi-depot split delivery vehicle routing problem: An integer programming-based heuristic, new test problems, and computational results. Comput. Ind. Eng. 2011, 61, 794–804. [Google Scholar] [CrossRef]
- Cornillier, F.; Boctor, F.; Renaud, J. Heuristics for the multi-depot petrol station replenishment problem with time windows. Eur. J. Oper. Res. 2012, 220, 361–369. [Google Scholar] [CrossRef]
- Allahyari, S.; Salari, M.; Vigo, D. A hybrid metaheuristic algorithm for the multi-depot covering tour vehicle routing problem. Eur. J. Oper. Res. 2015, 242, 756–768. [Google Scholar] [CrossRef]
- Bezerra, S.N.; de Souza, S.R.; Souza, M.J.F. A GVNS Algorithm for Solving the Multi-Depot Vehicle Routing Problem. Electron. Notes Discret. Math. 2018, 66, 167–174. [Google Scholar] [CrossRef]
- Brandão, J. A memory-based iterated local search algorithm for the multi-depot open vehicle routing problem. Eur. J. Oper. Res. 2020, 284, 559–571. [Google Scholar] [CrossRef]
- Halpern, J. Shortest route with time dependent length of edges and limited delay possibilities in nodes. Math. Methods Oper. Res. 1977, 21, 117–124. [Google Scholar] [CrossRef]
- Orda, A.; Rom, R. Shortest-path and minimum-delay algorithms in networks with time-dependent edge-length. J. ACM 1997, 37. [Google Scholar] [CrossRef] [Green Version]
- Cai, X.; Kloks, T.; Wong, C.K. Shortest Path Problems with Time Constraints; Springer: Berlin, Germany, 1996. [Google Scholar] [CrossRef]
- Cai, X.; Kloks, T.; Wong, C.K. Time-varying shortest path problems with constraints. Networks 1997, 29, 141–150. [Google Scholar] [CrossRef]
- Dean, B. Introduction Algorithms for Minimum-Cost Paths in Time-Dependent Networks with Waiting Policies. DBLP 2004, 44, 41–46. [Google Scholar] [CrossRef] [Green Version]
- Li, L.; Zheng, K.; Wang, S.; Hua, W.; Zhou, X. Go slow to go fast: Minimal on-road time route scheduling with parking facilities using historical trajectory. VLDB J. Int. J. Very Large Data Bases 2018, 27, 321–345. [Google Scholar] [CrossRef]
- Omer, J.; Poss, M. Time-dependent shortest paths with discounted waits. Networks 2019, 74, 287–301. [Google Scholar] [CrossRef] [Green Version]
- He, E.; Boland, N.; Nemhauser, G.; Savelsbergh, M. Time-Dependent Shortest Path Problems with Penalties and Limits on Waiting. INFORMS J. Comput. 2021, 33, 997–1014. [Google Scholar] [CrossRef]
- Fan, H.; Zhang, Y.; Tian, P.; Lv, Y.; Fan, H. Time-dependent multi-depot green vehicle routing problem with time windows considering temporal-spatial distance. Comput. Oper. Res. 2021, 129, 105211. [Google Scholar] [CrossRef]
- Hickman, J.; Hassel, D.; Joumard, R.; Samaras, Z.; Sorenson, S.C. Methodology for Calculating Transport Emissions and Energy Consumption; Transport Research Laboratory: Crowthorne, UK, 1999; pp. 69–73. [Google Scholar]
- Ibaraki, T.; Imahori, S.; Nonobe, K.; Sobue, K.; Uno, T.; Yagiura, M. An iterated local search algorithm for the vehicle routing problem with convex time penalty functions. Discret. Appl. Math. 2008, 156, 2050–2069. [Google Scholar] [CrossRef]
- Majumder, S.; Saha, B.; Anand, P.; Kar, S.; Pal, T. Uncertainty based genetic algorithm with varying population for random fuzzy maximum flow problem. Expert Syst. 2018, 35, e12264. [Google Scholar] [CrossRef]
- Wang, X.; Xinyu, L.; Zhang, J. The Optimization Research of Vehicle Routing Problem with Heterogeneous Fleet, Simultaneous Pickup-Delivery Considering Temporal-Spatial Distance. Chin. J. Manag. 2018, 15, 918–926. [Google Scholar]
- Liu, H. Research and Application of Improved Clustering Algorithm in Retail Customer Classification. Symmetry 2021, 13, 1789. [Google Scholar]
- Qi, M.Y.; Zhang, J.J.; Ren, L. Vehicle Routing Algorithm Based on Spatiotemporal Clustering. Comput. Sci. 2014, 41, 218–222. [Google Scholar]
- Liao, L.; Leung, V.C.M.; Li, Z.; Chao, H.C. Genetic Algorithms with Variant Particle Swarm Optimization Based Mutation for Generic Controller Placement in Software-Defined Networks. Symmetry 2021, 13, 1133. [Google Scholar] [CrossRef]
- Xue, X.; Jiang, C. Matching sensor ontologies with multi-context similarity measure and parallel compact differential evolution algorithm. IEEE Sens. J. 2021, 21, 24570–24578. [Google Scholar] [CrossRef]
- Namasudra, S.; Dhamodharavadhani, S.; Rathipriya, R. Nonlinear neural network based forecasting model for predicting COVID-19 cases. Neural Process. Lett. 2021, 1–21. [Google Scholar] [CrossRef]
- Pan, J.S.; Hu, P.; Snášel, V.; Chu, S.C. A survey on binary metaheuristic algorithms and their engineering applications. Artif. Intell. Rev. 2022, 1–67. [Google Scholar] [CrossRef]
- Kang, L.; Chen, R.S.; Xiong, N.; Chen, Y.C.; Hu, Y.X.; Chen, C.M. Selecting hyper-parameters of Gaussian process regression based on non-inertial particle swarm optimization in Internet of Things. IEEE Access 2019, 7, 59504–59513. [Google Scholar] [CrossRef]
- Wu, T.Y.; Lin, J.C.W.; Zhang, Y.; Chen, C.H. A grid-based swarm intelligence algorithm for privacy-preserving data mining. Appl. Sci. 2019, 9, 774. [Google Scholar] [CrossRef] [Green Version]
- Pan, J.S.; Hu, P.; Chu, S.C. Binary fish migration optimization for solving unit commitment. Energy 2021, 226, 120329. [Google Scholar] [CrossRef]
- Kong, L.; Chen, C.M.; Shih, H.C.; Lin, C.W.; He, B.Z.; Pan, J.S. An energy-aware routing protocol using cat swarm optimization for wireless sensor networks. In Advanced Technologies, Embedded and Multimedia for Human-Centric Computing; Springer: Berlin/Heidelberg, Germany, 2014; pp. 311–318. [Google Scholar]
- Cordeau, J.F.; Gendreau, M.; Laporte, G. A tabu search heuristic for periodic and multi-depot vehicle routing problems. Networks 1997, 30, 105–119. [Google Scholar] [CrossRef]
Parameters | Definitions |
---|---|
D | The set of depots |
C | The set of customers |
V | The set of all nodes, The union of D and C |
E | The edge set |
K | the set of all vehicles |
Q | Maximum load capacity of the vehicle |
W | Maximum waitable time per node |
The time window of the depot | |
The earliest time the vehicle can leave the depot | |
The latest time a vehicle can arrive at the depot | |
Time window for node i | |
Distance between node i and node j, in km | |
Demand for node i | |
Time of departure of vehicle k at node i | |
Time of arrival of vehicle k at node i | |
Time of waiting of vehicle k at node i | |
Service time required for node i | |
Load weight on the path from node i to node j on vehicle k | |
travel time between node i and node j | |
Cost per liter of fuel | |
Fixed cost per vehicle | |
Early arrival time window penalty for early arrival at the node | |
Late time window penalty for arriving at the node overtime | |
Emissions of the vehicle from node i to node j | |
Fuel consumption of the vehicle driving from node i to node j | |
If vehicle k drives from node i to node j, , else | |
If the customer i is served by the depot j, |
Node | x | y | Node | x | y | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 37 | 52 | 0.15 | 8.0 | 9.0 | 2 | −49 | −49 | 0.2 | 12.5 | 13.0 |
3 | −52 | 64 | 0.8 | 7.5 | 9.0 | 4 | 20 | −26 | 0.75 | 8.5 | 18.0 |
5 | 40 | −30 | 0.55 | 11.5 | 16.0 | 6 | −21 | 47 | 0.75 | 13.5 | 18.5 |
7 | 17 | 63 | 0.7 | 10.0 | 18.5 | 8 | 31 | −62 | 0.5 | 14.5 | 16.0 |
9 | −52 | 33 | 0.65 | 7.5 | 13.0 | 10 | 51 | 21 | 0.95 | 14.0 | 17.0 |
11 | 42 | 41 | 0.2 | 12.0 | 15.0 | 12 | −31 | −32 | 0.85 | 13.5 | 13.0 |
13 | −5 | −25 | 0.1 | 13.5 | 14.5 | 14 | 12 | −42 | 0.9 | 8.5 | 9.0 |
15 | −36 | −16 | 0.65 | 11.0 | 13.5 | 16 | 52 | −41 | 0.4 | 6.5 | 12.0 |
17 | −27 | −23 | 0.35 | 13.5 | 14.5 | 18 | 17 | −33 | 0.8 | 8.0 | 17.5 |
19 | 13 | 13 | 0.2 | 6.0 | 9.0 | 20 | −57 | 58 | 0.6 | 8.0 | 18.0 |
21 | 62 | −42 | 0.1 | 12.5 | 15.0 | 22 | −42 | 57 | 0.01 | 11.0 | 17.5 |
23 | −16 | −57 | 0.05 | 11.5 | 13.0 | 24 | −8 | 52 | 0.4 | 8.0 | 10.5 |
25 | 7 | −38 | 0.35 | 11.5 | 13.0 | 26 | −27 | −68 | 0.7 | 14.0 | 17.0 |
27 | 30 | 48 | 0.3 | 12.5 | 17.5 | 28 | −43 | 67 | 0.45 | 8.5 | 8.0 |
29 | 58 | −48 | 0.8 | 9.0 | 11.0 | 30 | −58 | 27 | 1.05 | 7.0 | 18.0 |
31 | 37 | 69 | 0.95 | 10.0 | 13.0 | 32 | 38 | 46 | 0.6 | 13.5 | 14.5 |
33 | −46 | 10 | 0.2 | 11.0 | 15.0 | 34 | 61 | −33 | 1.0 | 10.0 | 12.0 |
35 | 62 | 63 | 0.6 | 10.5 | 15.5 | 36 | −63 | −69 | 0.65 | 13.0 | 17.5 |
37 | 32 | 22 | 0.8 | 10.0 | 18.5 | 38 | 45 | −35 | 0.25 | 12.0 | 12.0 |
39 | −59 | 15 | 0.9 | 13.5 | 13.5 | 40 | 5 | −6 | 0.75 | 7.5 | 9.0 |
41 | 10 | −17 | 0.35 | 11.5 | 17.5 | 42 | 21 | −10 | 0.35 | 9.5 | 12.5 |
43 | −5 | 64 | 0.01 | 8.0 | 12.0 | 44 | −30 | 15 | 0.6 | 6.0 | 16.0 |
45 | 39 | −10 | 0.65 | 8.5 | 14.5 | 46 | −32 | 39 | 0.75 | 8.5 | 16.5 |
47 | −25 | 32 | 0.2 | 12.0 | 16.5 | 48 | 25 | 55 | 0.35 | 10.5 | 15.0 |
49 | −48 | −28 | 0.1 | 11.0 | 14.0 | 50 | 56 | 37 | 0.65 | 10.5 | 11. |
D1 | 20 | 20 | 6.0 | 18. | D2 | −30 | 40 | 6.0 | 18.0 | ||
D3 | 50 | −30 | 6.0 | 18.0 | D4 | −60 | −50 | 6.0 | 18.0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, C.-M.; Lv, S.; Ning, J.; Wu, J.M.-T. A Genetic Algorithm for the Waitable Time-Varying Multi-Depot Green Vehicle Routing Problem. Symmetry 2023, 15, 124. https://doi.org/10.3390/sym15010124
Chen C-M, Lv S, Ning J, Wu JM-T. A Genetic Algorithm for the Waitable Time-Varying Multi-Depot Green Vehicle Routing Problem. Symmetry. 2023; 15(1):124. https://doi.org/10.3390/sym15010124
Chicago/Turabian StyleChen, Chien-Ming, Shi Lv, Jirsen Ning, and Jimmy Ming-Tai Wu. 2023. "A Genetic Algorithm for the Waitable Time-Varying Multi-Depot Green Vehicle Routing Problem" Symmetry 15, no. 1: 124. https://doi.org/10.3390/sym15010124
APA StyleChen, C. -M., Lv, S., Ning, J., & Wu, J. M. -T. (2023). A Genetic Algorithm for the Waitable Time-Varying Multi-Depot Green Vehicle Routing Problem. Symmetry, 15(1), 124. https://doi.org/10.3390/sym15010124