Route Optimization for Open Vehicle Routing Problem (OVRP): A Mathematical and Solution Approach
Abstract
:1. Introduction
2. Related Work
3. Materials and Methods
3.1. Experiment Design
3.1.1. Experimentation
3.1.2. Data Analysis
3.2. Problem Definition
3.3. Formulation of the Mathematical Model
3.4. Solution and Analysis of Results
3.4.1. Heuristic Algorithms—Greedy (H.1)
Algorithm 1. The pseudo-code of Greedy (H.1) algorithm | |
1: | Input: List of vehicles (vehicles), List of customers (customers), Vehicle capacities (Q), Demand per customer (q), Distance matrix (distance) |
2: | Output: Dictionary of routes (routes) |
3: | Initialize an empty route dictionary. |
4: | Initialize a list of available vehicles (available_vehicles) from vehicles. |
5: | As long as customers are not empty and vehicles are available: |
a. Select the first available vehicle (vehicle_available) | |
b. Initialize the current vehicle capacity (current_capacity) with Q[vehicle]. | |
c. Start a new route with the vehicle in the depot (current_route = [0]). | |
d. Initialize the distance traveled (distance_traveled) to 0. | |
e. As long as current_capacity > 0 and customers are not empty | |
i. Find the nearest customer (nearest_closest_customer) to the last stop in current_route. | |
ii. If the demand of the nearest_closest_customer (q[nearest_customer]) is less than or equal to the current_capacity: q[nearest_customer]. | |
equal to the current_capacity: | |
1. Deduct demand from current_capacity 2. | |
2. Add the distance to distance_traveled | |
3. Add nearest_closest_customer to current_route | |
4. Remove nearest_customer from customers | |
iii. Otherwise, break loop | |
f. Store completed route (routes[vehicle] = current_route) | |
g. Delete vehicle from available_vehicles | |
6: | Return routes |
3.4.2. Heuristic Algorithms—Nearest Neighbor (H.2)
Algorithm 2. The pseudo-code of Nearest Neighbor (H.2) algorithm | |
1: | Inputs: Initial node (initial_node), List of customers (customers), Distance matrix (distance), Maximum capacity (maximum_capacity), Initial set of visited nodes (visited_nodes). |
2: | Output: List of nodes representing the route (NN) with starting_node |
3: | If nodes_visited is None, then it is initialized as an empty set. |
4: | Initialize the nearest neighbor (NN) path with initial_node. |
5: | Initialize the current capacity (current_capacity) to 0 4. |
6: | Initialize the number of clients (n) with the length of clients 5. |
7: | Add initial_node to visited_nodes |
8: | As long as the length of NN is less than n. |
a. Set k in the last node of NN. | |
b. Initialize a dictionary (nn) with the distances from k to each client not in NN and | |
not in visited_nodes | |
c. If nn is empty, break the loop | |
d. Find the nearest neighbor (new) from nn by selecting the key with the minimum value. | |
e. Check if adding this client stays within max_capacity: | |
i. If yes, add the second node from new to NN. | |
1. Add demand from new[0,1] to current_capacity 2. 2. | |
2. Add new[0,1] to visited_nodes 2. 2. Add new[0,1] to visited_nodes | |
ii. Otherwise, break loop | |
9: | Return NN |
3.4.3. Heuristic Algorithms—Local Search (H.3)
Algorithm 3. The pseudo-code of Local Search (H.3) algorithm | |
1: | Input: Initial Route (NN), Distance Matrix (distance) |
2: | Output: Improved route after local search (NN) |
3: | Initialize min_change to 0 |
4: | For i from 0 to length(NN)—2: |
a. For j from i + 2 to length(NN)—1: | |
i. Calculate current_cost as distance[(NN[i], NN[i + 1])] + distance[(NN[j], | |
NN[j + 1])] | |
ii. Calculate new_cost as distance[(NN[i], NN[j])] + distance[(NN[i + 1], | |
NN[j + 1])] | |
iii. Calculate change as new_cost—current_cost | |
iv. If change < min_change: | |
1. Set min_change to change 2. | |
2. Set min_i to i | |
3. Set min_j to j | |
5: | If min_change < 0: |
a. Invert the segment NN[min_i + 1 : min_j + 1]. | |
6: | Returns NN |
# Local initialization | |
counter = 0 | |
# Execution of the Algorithm with Local Search | |
while True | |
a. Increment counter by 1 | |
b. Compute first as the sum of distances for all paths in routes | |
c. For each route in routes | |
i. Copy previous_route from current route | |
ii. Apply Local_Search to the current route | |
iii. Calculate dist_current as the distance from previous_route | |
iv. Calculate dist_new as the distance from the current_route | |
d. Calculate ultima as the sum of distances of all routes in routes. | |
e. Calculate interchange as the absolute difference between last and first | |
f. If interchange == 0, break the loop. |
3.4.4. Heuristic Algorithms—Nearest Neighbor + Local Search
Algorithm 4. The pseudo-code of Nearest Neighbor + Local Search algorithm | |
1: | Inputs: List of routes (routes), Distance matrix (distance), Function for calculating the route distance (calculate_route_distance) |
2: | Output: Improved routes after local search (routes) |
3: | Initialize the solution as a copy of the initial routes. 2. |
4: | Initialize counter to 0 |
5: | As long as true |
a. Increment counter by 1 | |
b. Compute first as the sum of compute_path_distance for all paths. | |
c. For i from 0 to length(routes): | |
i. Copy previous_route from routes[i]. | |
ii. Apply Local_Search to routes[i]. | |
iii. Calculate current_distance as calculate_distance_route(previous_route, distance) | |
iv. Calculate new_distance as calculate_route_distance(routes[i], distance) | |
d. Calculate last as the sum of calculate_route_distance for all routes. | |
e. Calculate interchange as abs(last—first) | |
f. If exchange == 0, break loop. | |
6: | Return routes |
4. Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Dantzig, G.; Fulkerson, R.; Johnson, S. Solution of a large-scale traveling-salesman problem. J. Oper. Res. Soc. Am. 1954, 2, 393–410. [Google Scholar] [CrossRef]
- Toth, P.; Vigo, D. (Eds.) Vehicle Routing: Problems, Methods, and Applications; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2014. [Google Scholar]
- Morillo, D.; Gatica, G. Learn by Modeling: Integer-Mixed Linear Programming: Learning Guide, from Problem to Solution with AMPL; Sello Editorial Javeriano-Pontificia Universidad Javeriana: Cali, Colombia, 2022. [Google Scholar]
- Ge, H.; Zhen, T.; Jiang, Y.; Che, Y. An intelligent solution for open vehicle routing problem in grain logistics. In Advances in Wireless Networks and Information Systems; Springer: Berlin/Heidelberg, Germany, 2010; pp. 389–396. [Google Scholar]
- Brandão, J. A deterministic iterated local search algorithm for the vehicle routing problem with backhauls. Top 2016, 24, 445–465. [Google Scholar] [CrossRef]
- Applegate, D.L.; Bixby, R.E.; Chvátal, V.; Cook, W.J. The Traveling Salesman Problem: A Computational Study; Princeton University Press: Princeton, NJ, USA, 2007. [Google Scholar]
- Kallrath, J. Modeling Languages in Mathematical Optimization; Springer Science & Business Media: Luxembourg, 2004. [Google Scholar]
- Zhang, Y.; Li, H.; Wang, Z.; Wang, H. A Multi-Objective Learning Whale Optimization Algorithm for Open Vehicle Routing Problem with Two-Dimensional Loading Constraints. Mathematics 2024, 12, 731. [Google Scholar] [CrossRef]
- Yousefikhoshbakht, M.; Didehvar, F.; Rahmati, F.; Ahmed, Z.H. Fixed fleet open vehicle routing problem: Mathematical model and a modified ant colony optimization. Bulletin of the Polish Academy of Sciences. Tech. Sci. 2024, 72, e148253. [Google Scholar]
- Ahmed, Z.H.; Yousefikhoshbakht, M. An improved tabu search algorithm for solving heterogeneous fixed fleet open vehicle routing problem with time windows. Alex. Eng. J. 2023, 64, 349–363. [Google Scholar] [CrossRef]
- Ozcetin, E.; Ozturk, G. A variable neighborhood search for Open Vehicle Routing Problem. Concurr. Comput. Pract. Exp. 2023, 35, e7598. [Google Scholar] [CrossRef]
- Ahmed, Z.H.; Yousefikhoshbakht, M. A Hybrid Algorithm for the Heterogeneous Fixed Fleet Open Vehicle Routing Problem with Time Windows. Symmetry 2023, 15, 486. [Google Scholar] [CrossRef]
- Zheng, F.; Du, L.; Li, X.; Zhang, J.; Tian, B.; Jallad, R.F. Multi-objective medical supplies distribution open vehicle routing problem with fairness and timeliness under major public health emergencies. Manag. Syst. Eng. 2023, 2, 5. [Google Scholar] [CrossRef]
- Dutta, J.; Barma, P.S.; Mukherjee, A.; Kar, S.; De, T. A hybrid multi-objective evolutionary algorithm for open vehicle routing problem through cluster primary-route secondary approach. Int. J. Manag. Sci. Eng. Manag. 2022, 17, 132–146. [Google Scholar] [CrossRef]
- Dasdemir, E.; Testik, M.C.; Öztürk, D.T.; Şakar, C.T.; Güleryüz, G.; Testik, Ö.M. A multi-objective open vehicle routing problem with overbooking: Exact and heuristic solution approaches for an employee transportation problem. Omega 2022, 108, 102587. [Google Scholar] [CrossRef]
- Ruiz y Ruiz, E.; García-Calvillo, I.; Nucamendi-Guillén, S. Open vehicle routing problem with split deliveries: Mathematical formulations and a cutting-plane method. Oper. Res. 2022, 22, 1017–1037. [Google Scholar] [CrossRef]
- Wu, X.; Hu, D.; Ma, B.; Jiang, R. The Two Echelon Open Vehicle Routing Problem: Optimization of Crowdshipping Based Parcel Delivery. KSCE J. Civ. Eng. 2022, 26, 4073–4085. [Google Scholar] [CrossRef]
- Öztop, H. A constraint programming model for the open vehicle routing problem with heterogeneous vehicle fleet. In The International Symposium for Production Research; Springer International Publishing: Cham, Switzerland, 2022; pp. 345–356. [Google Scholar]
- Peng, Z.; Pirozmand, P.; Xiong, Y. Improved Harris Hawks Optimizer algorithm to solve the multi-depot open vehicle routing problem. Evol. Intell. 2024, 17, 2495–2513. [Google Scholar] [CrossRef]
- Xiao, S.; Peng, P.; Zheng, P.; Wu, Z. A Hybrid Adaptive Simulated Annealing and Tempering Algorithm for Solving the Half-Open Multi-Depot Vehicle Routing Problem. Mathematics 2024, 12, 947. [Google Scholar] [CrossRef]
- Bezerra, S.N.; de Souza, S.R.; Souza, M.J.F. A general VNS for the multi-depot open vehicle routing problem with time windows. Optim. Lett. 2023, 17, 2033–2063. [Google Scholar] [CrossRef]
- Shao, W.; Xiao, T.; Su, Z.; Ding, J.; Lü, Z. A hybridization of granular adaptive tabu search with path relinking for the multi-depot open vehicle routing problem. Egypt. Inform. J. 2023, 24, 100420. [Google Scholar] [CrossRef]
- Soares, V.C.; Roboredo, M. On the exact solution of the multi-depot open vehicle routing problem. Optim. Lett. 2023, 18, 1053–1069. [Google Scholar] [CrossRef]
- Du, M. Improved Ant Colony Algorithm for Solving multi-deport Open Vehicle Routing Problem with Fuzzy Time Window. In Proceedings of the 2023 3rd International Conference on Digital Society and Intelligent Systems (DSInS), Chengdu, China, 10–12 November 2023; pp. 410–414. [Google Scholar]
- Boyd, S.P.; Vandenberghe, L. Convex Optimization; Cambridge University Press: Cambridge, UK, 2004. [Google Scholar]
- Fourer, R.; Gay, D.M.; Kernighan, B.W. AMPL: A Modeling Language for Mathematical Programming; Thomson/Brooks Cole: Pacific Grove, CA, USA, 2003. [Google Scholar]
- Sumbal, M.S.; Ahmed, W.; Shahzeb, H.; Chan, F. Sustainable Technology Strategies for Transportation and Logistics Challenges: An Implementation Feasibility Study. Sustainability 2023, 15, 5224. [Google Scholar] [CrossRef]
- Lin, S. Computer Solutions of the Traveling Salesman Problem. Bell Syst. Tech. J. 1965, 44, 2245–2269. [Google Scholar] [CrossRef]
- Mardones, B.; Gatica, G.; Contreras-Bolton, C. A metaheuristic for the double traveling salesman problem with partial last-in-first-out loading constraints. Int. Trans. Oper. Res. 2023, 30, 3904–3929. [Google Scholar] [CrossRef]
- Ren, C. Research on Single and Mixed Fleet Strategy for Open Vehicle Routing Problem. J. Softw. 2011, 6, 2076–2081. [Google Scholar] [CrossRef]
- Uddin, F.; Riaz, N.; Manan, A.; Mahmood, I.; Song, O.Y.; Malik, A.J.; Abbasi, A.A. An improvement to the 2-opt heuristic algorithm for approximation of optimal TSP tour. Appl. Sci. 2023, 13, 7339. [Google Scholar] [CrossRef]
- Masson, A.; Paravie, D.I.; Rohvein, C.; Villalba, L. Review of vehicle routing problems solving software. Inge CuC 2021, 17, 315–328. [Google Scholar] [CrossRef]
Symbol | Description |
---|---|
E | Instance |
N | Number of nodes within the instance |
K | Number of vehicles used in the instance |
LKH-3 | Lin–Kernighan–Helsgaun |
AMPL | A Mathematical Programming Language |
H.1 | Heuristic algorithm—Greedy |
H.2 | Heuristic algorithm—Nearest Neighbor |
H.3 | Heuristic algorithm—Local Search |
H.4 | Heuristic algorithm—Nearest Neighbor + Local Search |
Type | Symbol | Definition |
---|---|---|
Sets | N | Set of nodes, includes clients and the repository. |
ARC | Set of arcs, represents the connection between node i and j. | |
Parameters | dn | Demand of each client. |
Vehicle capacity. | ||
cij | Cost of traveling from one node to another. | |
Variables | xij | Binary variable equal to 1 if the arc is used and 0 otherwise. |
un | Continuous variable for subtour elimination. |
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. |
© 2024 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
Gasset, D.; Paillalef, F.; Payacán, S.; Gatica, G.; Herrera-Vidal, G.; Linfati, R.; Coronado-Hernández, J.R. Route Optimization for Open Vehicle Routing Problem (OVRP): A Mathematical and Solution Approach. Appl. Sci. 2024, 14, 6931. https://doi.org/10.3390/app14166931
Gasset D, Paillalef F, Payacán S, Gatica G, Herrera-Vidal G, Linfati R, Coronado-Hernández JR. Route Optimization for Open Vehicle Routing Problem (OVRP): A Mathematical and Solution Approach. Applied Sciences. 2024; 14(16):6931. https://doi.org/10.3390/app14166931
Chicago/Turabian StyleGasset, Diego, Felipe Paillalef, Sebastián Payacán, Gustavo Gatica, Germán Herrera-Vidal, Rodrigo Linfati, and Jairo R. Coronado-Hernández. 2024. "Route Optimization for Open Vehicle Routing Problem (OVRP): A Mathematical and Solution Approach" Applied Sciences 14, no. 16: 6931. https://doi.org/10.3390/app14166931
APA StyleGasset, D., Paillalef, F., Payacán, S., Gatica, G., Herrera-Vidal, G., Linfati, R., & Coronado-Hernández, J. R. (2024). Route Optimization for Open Vehicle Routing Problem (OVRP): A Mathematical and Solution Approach. Applied Sciences, 14(16), 6931. https://doi.org/10.3390/app14166931