- Higher Technical School of Computer Systems Engineering (ETSISI), Polytechnic University of Madrid (UPM), Madrid, Spain
In the ever-evolving landscape of global trade and supply chain management, logistics optimization stands as a critical challenge. This study takes on the Vehicle Routing Problem (VRP), a variant of the Traveling Salesman Problem (TSP), by proposing a novel hybrid solution that seamlessly combines classical and quantum computing methodologies. Through a comprehensive analysis of our approach, including algorithm selection, data collection, and computational processes, we provide in-depth insights into the efficiency, and effectiveness of our hybrid solution compared to traditional methods. The results after analysis of 14 datasets highlight the advantages and limitations of this approach, demonstrating its potential to address NP-hard problems and contribute significantly to the field of optimization algorithms in logistics. This research offers promising contributions to the advancement of logistics optimization techniques and their potential implications for enhancing supply chain efficiency.
1 Introduction
The quantum computing industry is in a bustling emerging phase, and many around the world are determining its applicability in real-life business scenarios. Enthusiasts, startups, academia, and governments are rushing to find “quantum advantage” and funding mid- to long-term research and development in this area. Many companies are working hard to develop and mature current quantum hardware, plus there is an increasing growth in areas related to software and services aiming to reap the benefits of quantum computing.
We have been investigating how to bridge the gap between scientific developments and current industry trends and needs. The process we followed is shown in Figure 1.
Current quantum computing technology is focused on problems such as simulation, optimization, factorization, linear algebra, and machine learning. Through these, it promises to deliver value in many different areas: life sciences, transport and logistics, financial services, and telecommunications, just to name a few.
2 Market analysis
The case for quantum computing in transport optimization is quite compelling. Current world trade is based on a strong and healthy supply chain, where logistics plays a key role in producing and providing key assets and goods to keep societies and economies going. One facet of the transport optimization problem is the vehicle routing problem (VRP). This
problem attempts to find an optimal set of routes for a fleet of vehicles to service a given set of customers; the business impact of the VRP is well measured.
The goal of last-mile delivery is to transport an item to its recipient in the quickest way possible. This has been driven by the continuously evolving market and demand for a convenient customer experience across industries such as e-commerce, food, retail, and many more. The last-mile delivery market has been steadily growing in the last decade, and the forecast opportunity follows the same path. The last-mile delivery market in Europe is expected to grow from USD 677.0 Mn in 2018 to USD 2,491.8 Mn by the year 2027, with a compound annual growth rate of 16.1% from 2019 to 2027,1 while in Latin America, the level of investment for the last five years is close to USD 300 Mn, leaving countries like Mexico, Colombia, Chile, and Argentina without a leading independent last-mile logistics company, where 60% of the last-mile delivery market is dominated by small, informal companies. This results in inefficiencies due to a lack of technologies such as route optimization as well as a lack of operating scale. These issues are quickly becoming more pronounced as e-commerce in Latin America has taken off at a compound annual industry growth rate of 16% over the past five years. In the case of Latam, the biggest e-commerce companies and retailers have made last-mile logistics the key value differentiator for growth, leveraging the technology tools and analytics processes to make investments and plans in advance.2 The situation for Europe is quite similar, given the importance of optimization in last-mile transportation. Key factors driving the region's market growth include rapid industrialization, the growth of the e-commerce sector, and the presence of large and established logistics players. While Germany is a predominant player in the European market, the main segment responsible for its growth is the business-to-consumer (B2C) sector. In Spain, the last-mile market is mainly indexed to the B2C sector, which is accountable for over USD 40 Bn e-commerce market size, where last-mile represents around 40% of total costs of logistics operations in a market dominated up to 80% by small or micro-enterprises (Deloitte, 2020).
The fact that there are common components in the last-mile market makes the proposal in this paper appealing for a close-term application of the technology and solution. In a rough estimate, for a market of USD 27 billion in Spain, with an average of 10% margin, where the Last Mile may represent something between 30 and 40% of the total cost, we aim for a USD 15 billion market, split in a granular small to micro enterprise sector, with close to 2,000 companies (de los Mercados y la Competencia, 2021). Any 1% savings in optimization can prove to be worth a very competitive return on investment; this is shown in Table 1.
Our work is focused on the applicability of transport optimization for the last-mile scenario. Transport optimization is the process of finding the best way to move assets from one place (the source location) to another (the destination). It is impacted by many distinct factors, like shipment analysis, transport cost structures, rates, and schedules, cargo, routes, delivery requirements and needs, etc. Combining all these different factors makes this problem extraordinarily complex and demands high computing power to find viable solutions. The problem is categorized as an NP-hard problem. Transport optimization, may be rephrased as finding the optimal value for a transport function; this is where it becomes a high-prospect match for current quantum technologies, specifically quantum annealing (Farhi et al., 2000).
3 Implementation
In order to find the best approach in terms of technology and time-to-market applicability, we solve the VRP using a hybrid approach (Feld et al., 2019), which exploits both classical and quantum techniques to find an optimized solution. The hybrid algorithm models the VRP problem using a 2-phase approach: first clustering or grouping the customers, and then finding the optimal routes inside each cluster. This approach is known as a cluster-first, route-second algorithm. For each of the two phases, we developed both a quantum and a classical algorithm to compare them and determine the most effective combination. The algorithms used are shown in Table 2.
3.1 Clustering phase
During the clustering phase, the objective is to find clusters of customers such that the intra-cluster distances are minimized. The clustering problem has additional constraints imposed so the sum of the demand of each customer inside each cluster does not exceed the available transport capacity of the vehicles; thus, the problem is a constrained clustering problem with cluster-level constraints. To solve it, we developed a modified version of the K-Medoids algorithm that takes into account the capacity constraints as the classical approach and a quadratic unconstrained binary optimization (QUBO) formulation of the problem as the quantum approach.
The QUBO formulation (Bauckhage et al., 2019; Date et al., 2021; Matsumoto et al., 2022) for the clustering phase shown below (Equation 5) is composed of the main objective function M (Equation 1) subject to two additional constraints. The main formula M tries to find an assignment of customers in clusters such that the total distance between customers inside each cluster is minimized. The first constraint C1 (Equation 3) adds a penalty for each customer not included in a cluster; the second constraint C2 (Equation 4) adds a penalty for each cluster in which the total customer demand is greater than the available vehicle capacity.
K is the total number of clusters, while I indicates the customer nodes. distij represents the distance matrix between all the possible customer nodes; this matrix is pre-computed beforehand. xik is a binary decision variable that indicates if the customer i is assigned to cluster k. C represents the available vehicle capacity, and di is the demand of customer i. The multipliers M1 and M2 are used to assign the weight of the corresponding penalty for each of the two constraints.
The developed K-Medoids algorithm is based on the Partitioning Around Medoids algorithm with an added capacity constraint. The steps of the algorithm are the following:
1. Select K data points with the highest demand as the medoids.
2. Determine the clusters by associating each data point to its closest medoid.
3. Compute the initial cluster costs by adding the distances from every point in each cluster to their medoid, add a penalty cost if the total demand of the cluster exceeds the vehicle capacity.
4. While the cluster costs decrease and the maximum number of iterations has not been reached:
(a) For each medoid m and for each non-medoid data point: n
i. Swap m and o and recompute the cluster costs.
ii. If the new cluster cost is higher than the previous one, undo the swap.
(b) Increase number of iterations.
5. Return the clusters.
3.2 Routing phase
Once the clusters have been established, the routing phase attempts to find the shortest routes starting from the depot, which travel through all the nodes and finally return to the depot. This problem is very similar to the Traveling Salesman Problem.
To solve the routing phase, we developed a combinatorial optimization algorithm as the classical approach and a QUBO formulation of the problem as the quantum approach. The QUBO formulation (Lucas, 2014), shown below (Equation 11), is composed of two different QUBO equations. The first equation (9) attempts to solve the Hamiltonian cycle problem, while the second equation (10) minimizes the route distances, thus solving the Traveling Salesman problem.
xi, j is a binary variable where i represents the order and j represents the customer. xi, j is equal to 1 if the customer with index j is visited in position i in the cycle, i, j ∈ 0, …, N where N is equal to the total number of customers. d is the distance matrix, which contains the distance between every customer; the depot is included as customer 0. The multipliers mA and mB are used to set the penalties for the distinct parts of the equation.
The first constraint C1 (Equation 6) ensures that every customer can only appear once in the cycle. The second constraint C2 (Equation 7) ensures that each position in the cycle must be assigned to only one customer. The third constraint C3 (Equation 8) is added so that every cycle starts at the depot.
The combinatorial optimization algorithm models the Traveling Salesman Problem using Google's OR-Tools framework.3 The search strategy used to find the solution is a meta-heuristic strategy called Guided Local Search (GLS). It is built on top of a local search algorithm while gradually adding penalties to certain features of the solutions to help the local search escape from local minima and plateaus.
4 Analysis
The experiments conducted in this study involved the utilization of a diverse range of datasets (Mendoza et al., 2014), featuring varying numbers of customers and vehicles. It is noteworthy that these datasets exhibit a wide spectrum of clusterability (Ackerman et al., 2016) rates regarding customer positions.
To evaluate the performance of our clustering algorithms, we employed two different metrics: the silhouette score (Rousseeuw, 1987) and the error count. The silhouette score measures the quality of the generated clusters by comparing the similarity of objects with their own cluster and with the other clusters. Its value ranges from –1 to +1; a higher value indicates the elements are well clustered. The number of errors generated by each clustering algorithm is the number of clusters where the total demand of its members exceeds the available vehicle capacity. The results, presented in Figure 2, focus on the application of these metrics to the datasets presented by Christofides, Mingozzi, and Toth (CMT) (Christofides et al., 1979).
Figure 2. Silhouette score and number of demand errors obtained with K-Medoids and QUBO clustering algorithms on the CMT 01-14 data-sets. (A) Silhouette score and dip P value. (B) Number of demand errors.
In Figures 2A, B, we observe that both algorithms perform comparably when the data exhibits a high level of clusterability (as indicated by a low dip P value Hartigan and Hartigan, 1985). However, in scenarios where the data exhibits a lower rate of clusterability, the QUBO formulation generally excels in producing more robust clusters when contrasted with the traditional K-Medoids algorithm. This success can be attributed to the enhanced flexibility inherent in the QUBO formulation compared to the classical K-Medoids algorithm. Furthermore, the quantum approach typically demonstrates a lower error rate, underscoring its adaptability and efficiency.
To assess the quality of the routing algorithms, we focused on measuring the total route distance generated by each algorithm. Figure 3 presents a comparison of the results obtained by both algorithms when applied to the CMT datasets used in the clustering phase.
Figure 3. Total distance obtained with OR-Tools and QUBO routing algorithms on the CMT 01-14 data-sets.
Figure 3 highlights a notable trend, specifically that the QUBO formulation for the routing problem typically yields longer route distances when compared to those produced by the combinatorial optimization algorithm. This observation underscores the need for further refinement of the quantum approach to match the optimization efficiency demonstrated by the classical algorithm.
The experiments with the quantum algorithms were performed using D-Wave's Advantage System 6.1 quantum annealer, offered by Amazon Braket. The size of the QUBO formula generated by the clustering algorithm is too large to embed on the available quantum annealers, so QBSolv (Booth et al., 2017) is used to split it into smaller sub-problems.
All the code necessary to run the experiments is available at https://github.com/punkyfer/vrpc.
5 Conclusions
During our research, we found that classical algorithms typically perform better than their quantum counterparts. This is not a totally fair comparison since, on the one hand, we have fine-tuned algorithms running on classical computing hardware, and on the other hand, we have QUBO formulations running on quantum annealers in noisy intermediate-scale quantum era hardware. Both technologies are on wildly different edges of the technology maturity ladder. Despite this disadvantageous situation, we have found that under certain circumstances, the quantum clustering algorithm presents an advantage over its classical counterpart, mainly in scenarios where the clusterability rate of the data is lower. When the data presents a lower rate of clusterability or a higher degree of randomness, the quantum clustering approach delivers better results than the K-Medoids algorithm. This is an outstanding finding, as it proves the potential for quantum computing in real business scenarios and sets the basis for future research into developing quantum algorithms for the constrained clustering problem. A bigger advantage may be achievable in future versions of quantum hardware, where more qubits and a more interconnected topology may provide better results at larger scales.
For the business analysis, we identified the potential for a cost-effective relationship between the cost of running a quantum algorithm and the quality of the results obtained. This cost-effectiveness is especially true when the data shows a higher degree of randomness, as is usually the case with real customer location data. This demonstrates a theoretical advantage for the quantum computing approach when applied to the constrained clustering problem.
Data availability statement
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding authors.
Author contributions
JA: Conceptualization, Formal analysis, Investigation, Methodology, Project administration, Software, Supervision, Validation, Visualization, Writing—original draft, Writing—review & editing. RP: Conceptualization, Formal analysis, Funding acquisition, Investigation, Project administration, Resources, Supervision, Validation, Writing—original draft, Writing—review & editing.
Funding
The author(s) declare financial support was received for the research, authorship, and/or publication of this article. Grupo GTD financed us with the funds necessary to run the experiments on real quantum hardware.
Acknowledgments
Our thanks to Alberto García and the rest of the teachers at UPM for providing us with the knowledge and guidance required to accomplish this work.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher's note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Footnotes
1. ^https://techcrunch.com/2021/07/22/last-mile-delivery-in-latin-america-is-ready-to-take-off/
2. ^https://www.mundomaritimo.cl/noticias/mercado-libre-amplia-brecha-con-falabella-y-se-prepara-para-enfrentar-la-irrupcion-de-amazon
3. ^https://acrogenesis.com/or-tools/documentation/user_manual/manual/tsp/routing_library.html
References
Ackerman, M., Adolfsson, A., and Brownstein, N. (2016). An effective and efficient approach for clusterability evaluation. arXiv preprint arXiv:1602.06687.
Bauckhage, C., Piatkowski, N., Sifa, R., Hecker, D., and Wrobel, S. (2019). “A qubo formulation of the k-medoids problem,” in Lernen, Wissen, Daten, Analysen.
Booth, M., Reinhardt, S. P., and Roy, A. (2017). Partitioning optimization problems for hybrid classical/quantum execution technical report. Technical Report.
Christofides, N., Mingozzi, A., and Toth, P. (1979). Combinatorial Optimization. Chichester, UK: Wiley.
Comisión Nacional de los Mercados y la Competencia. (2021). Informe anual del sector postal 2020. Available online at: https://www.cnmc.es/sites/default/files/4276304.pdf (accessed October 27, 2023).
Date, P., Arthur, D., and Pusey-Nazzaro, L. (2021). Qubo formulations for training machine learning models. Scient. Rep. 11, 10029. doi: 10.1038/s41598-021-89461-4
Farhi, E., Goldstone, J., Gutmann, S., and Sipser, M. (2000). Quantum computation by adiabatic evolution. arXiv preprint quant-ph/0001106.
Feld, S., Roch, C., Gabor, T., Seidel, C., Neukart, F., Galter, I., et al. (2019). A hybrid solution method for the capacitated vehicle routing problem using a quantum annealer. Front. ICT 6, 13. doi: 10.3389/fict.2019.00013
Hartigan, J. A., and Hartigan, P. M. (1985). The dip test of unimodality. Ann. Statist. 13, 70–84. doi: 10.1214/aos/1176346577
Lucas, A. (2014). Ising formulations of many NP problems. Front. Phys. 2, 5. doi: 10.3389/fphy.2014.00005
Matsumoto, N., Hamakawa, Y., Tatsumura, K., and Kudo, K. (2022). Distance-based clustering using Qubo formulations. Scient. Rep. 12, 2669. doi: 10.1038/s41598-022-06559-z
Mendoza, J., Guéret, C., Hoskins, M., Lobit, H., Pillac, V., Vidal, T., et al. (2014). “VRP-REP: the vehicle routing community repository,” in Third meeting of the EURO Working Group on Vehicle Routing and Logistics Optimization (VeRoLog) (Oslo, Norway).
Keywords: quantum computing, quantum annealing, quadratic unconstrained binary optimization (QUBO), vehicle routing problem (VRP), traveling salesman problem (TSP), supply chain, last mile
Citation: Ariño Sales JF and Palacios Araos RA (2023) Adiabatic quantum computing impact on transport optimization in the last-mile scenario. Front. Comput. Sci. 5:1294564. doi: 10.3389/fcomp.2023.1294564
Received: 14 September 2023; Accepted: 30 October 2023;
Published: 15 November 2023.
Edited by:
Susan Mniszewski, Los Alamos National Laboratory (DOE), United StatesReviewed by:
Ma Hongyang, Qingdao University of Technology, ChinaRichard Warren, The Pennsylvania State University (PSU), United States
Copyright © 2023 Ariño Sales and Palacios Araos. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Juan Francisco Ariño Sales, anVhbmFyaW5vc2FsZXMmI3gwMDA0MDtnbWFpbC5jb20=; Raúl Andrés Palacios Araos, cmF1bC5hbmRyZXMucGFsYWNpb3MmI3gwMDA0MDtnbWFpbC5jb20=
†These authors have contributed equally to this work