|
26 | 26 | "\n", |
27 | 27 | "## The Introduction\n", |
28 | 28 | "\n", |
29 | | - "Logistics is a major industry, with some estimates valuing it at USD 8183 billion globally in 2015. Most service providers operate a number of vehicles (e.g., trucks and container ships), a number of depots, where the vehicles are based overnight, and serve a number of client locations with each vehicle during each day. There are many optimisation and control problems that consider these parameters. Computationally, the key challenge is how to design routes from depots to a number of client locations and back to the depot, so as to minimise vehicle-miles travelled, time spent, or similar objective functions. In this notebook we formalise an idealised version of the problem and showcase its solution using the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). \n", |
| 29 | + "Logistics is a major industry, with some estimates valuing it at USD 8183 billion globally in 2015. Most service providers operate a number of vehicles (e.g., trucks and container ships), a number of depots, where the vehicles are based overnight, and serve a number of client locations with each vehicle during each day. There are many optimization and control problems that consider these parameters. Computationally, the key challenge is how to design routes from depots to a number of client locations and back to the depot, so as to minimize vehicle-miles traveled, time spent, or similar objective functions. In this notebook we formalize an idealized version of the problem and showcase its solution using the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). \n", |
30 | 30 | "\n", |
31 | 31 | "The overall workflow we demonstrate comprises:\n", |
32 | 32 | "\n", |
|
36 | 36 | "\n", |
37 | 37 | "4. compute the actual routes. This step is run twice, actually. First, we obtain a reference value by a run of a classical solver (IBM CPLEX) on the classical computer. Second, we run an alternative, hybrid algorithm partly on the quantum computer.\n", |
38 | 38 | "\n", |
39 | | - "5. visualisation of the results. In our case, this is again a simplistic plot.\n", |
| 39 | + "5. visualization of the results. In our case, this is again a simplistic plot.\n", |
40 | 40 | "\n", |
41 | 41 | "In the following, we first explain the model, before we proceed with the installation of the pre-requisites and the data loading.\n", |
42 | 42 | "\n", |
43 | 43 | "## The Model \n", |
44 | 44 | "\n", |
45 | | - "Mathematically speaking, the vehicle routing problem (VRP) is a combinatorial problem, wherein the best routes from a depot to a number of clients and back to the depot are sought, given a number of available vehicles. There are a number of formulations possible, extending a number of formulations of the travelling salesman problem [Applegate et al, 2006]. Here, we present a formulation known as MTZ [Miller, Tucker, Zemlin, 1960]. \n", |
| 45 | + "Mathematically speaking, the vehicle routing problem (VRP) is a combinatorial problem, wherein the best routes from a depot to a number of clients and back to the depot are sought, given a number of available vehicles. There are a number of formulations possible, extending a number of formulations of the traveling salesman problem [Applegate et al, 2006]. Here, we present a formulation known as MTZ [Miller, Tucker, Zemlin, 1960]. \n", |
46 | 46 | "\n", |
47 | 47 | "Let $n$ be the number of clients (indexed as $1,\\dots,n$), and $K$ be the number of available vehicles. Let $x_{ij} = \\{0,1\\}$ be the binary decision variable which, if it is $1$, activates the segment from node $i$ to node $j$. The node index runs from $0$ to $n$, where $0$ is (by convention) the depot. There are twice as many distinct decision variables as edges. For example, in a fully connected graph, there are $n(n+1)$ binary decision variables. \n", |
48 | 48 | "\n", |
|
97 | 97 | "\n", |
98 | 98 | "Here, we demonstrate an approach that combines classical and quantum computing steps, following the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). In particular, we use the variational quantum eigensolver (VQE). We stress that given the use of limited depth of the quantum circuits employed (variational forms), it is hard to discuss the speed-up of the algorithm, as the solution obtained is heuristic in nature. At the same time, due to the nature and importance of the target problems, it is worth investigating heuristic approaches, which may be worthwhile for some problem classes. \n", |
99 | 99 | "\n", |
100 | | - "Following [5], the algorithm can be summarised as follows:\n", |
| 100 | + "Following [5], the algorithm can be summarized as follows:\n", |
101 | 101 | "- Preparation steps: \n", |
102 | 102 | "\t- Transform the combinatorial problem into a binary polynomial optimization problem with equality constraints only;\n", |
103 | 103 | "\t- Map the resulting problem into an Ising Hamiltonian ($H$) for variables ${\\bf z}$ and basis $Z$, via penalty methods if necessary;\n", |
|
807 | 807 | "source": [ |
808 | 808 | "### Step 4\n", |
809 | 809 | "\n", |
810 | | - "Solve the problem via VQE. N.B. Depending on the number of qubits, the state-vector simulation can can take a while; for example with 12 qubits, it takes more than 12 hours. Logging useful to see what the program is doing." |
| 810 | + "Solve the problem via VQE. N.B. Depending on the number of qubits, the state-vector simulation can can take a while; for example with 12 qubits, it takes more than 12 hours. Logging is useful to see what the program is doing." |
811 | 811 | ] |
812 | 812 | }, |
813 | 813 | { |
|
0 commit comments