In this research work, we applied some solving techniques on Travelling salesman problem (TSP) and Capaciated Vehicle routing problem (CVRP) which are some of the variants of vehicle routing problem. For each of the considered problem, Branch-and-cut was applied on TSP and Column generation technique was used on CVRP. We obtained optimal solution and tour. Hence, these methods can be used to solve similar problem for optimal solution.
The cost of transportation of goods and services is one of the major challenges people face in their daily activities. This area has raised concern in todays society. A large sum of money is spent daily on fuel, goods and service delivery, equipment maintenance and so on [1]. This is where the knowledge and technique of Operations Research (OR) comes to play. If the available resources is known, one can employ the techniques of OR. According to [2], the use of computerized techniques in solving transportation problem most times often leads to about \(5% -20%\) savings on transportation cost. Therefore, planning of distribution process, research and studying OR-techniques is worthwhile and will save some transportation cost.
The Vehicle Routing Problem (VRP) has been a problem for several decades and one of the most studied problem in logistics engineering, applied mathematics and computer science, and which is described as finding optimal routes for a fleet of vehicles to serve some scattered customers from depot [3]. VRP have several variants which includes:
The VRP is a combinatorial optimization and integer programming problem which finds optimal path in order to deliver goods and services to a finite set of customers.
The Travelling Salesman Problem (TSP) is one of the variant of Vehicle Routing Problem (VRP) which is a classical and widely studied problem in combinatorial optimization [9]. TSP has been studied in Operations Research (OR), engineering and computer science since \(1950\)s and several techniques been developed to solve this kind of problem. TSP describes a salesman who must travel through \(n\) cities. The order of visiting the cities is not of importance, as long as the salesman visit every city exactly once and return to the starting city [10]. The cities are connected to one another through a weighted link.
CVRP is another variant of VRP involves vehicles with limited carrying capacity of goods and these goods must be delivered. In CVRP, the major factors we consider are the customers demands, number of vehicles availabe and the vehicle capacity. The objective is to find optimal route such that each and every customer is served once and every vehicle is loaded according to its capacity and not more [1]. The first article was introduced by [11], which was related to the concept of vehicle routing problem by trying to solve the truck dispatching problem with the objective of finding optimal supply-technique from the bulk terminal to the large number of service stations. [12] implemented the branch and cut algorithm to solve a large scale traveling salesman problem where the problem has to be solved many times in branch and cut algorithm before a solution to the TSP was obtained. Using large scale instances of the TSP, a substantial portion of the execution time of the entire branch and cut algorithm is spent in linear program optimiser. In their work, they constructed a full implementation of branch and cut algorithm, utilising the special structure. However, all of the refinements discussed in [13] are not implemented. Column Generation (CG), an exact approach for solving VRP was used and reported successful in solving VRPTW [14,15]. With its success, many researchers perform their further research with this technique. [16] proposed and used CG technique to solve the Heterogeneous Fleet Vehicle Routing Problem (HVRP). Applications of Vehicle Routing Problem cut across several areas which includes; Courier service [17], realtime delivery of customers demand [18], milk runs dispatching system in real time [19] and milk collection problem [20].
The goal of this paper is to solve TSP and CVRP using branch-and-cut and column generation algorithms, respectively. We shall use methods that will give us optimal routes for each of these considered variants.
A Linear programming (LP) problem is a problem that is to maximize or minimize a linear function subject to specified linear equality or inequality constraints. A general form of an LP program is given as follows.
Definition 1. Given a system \(Ax = b\) of \(n\) linear equations in \(m\) variables, for \(m \ge n\). A basic solution to \(Ax = b\) is obtained by setting variables \(n – m = 0\) and solving for the values of the remaining \(m\) variables. This assumes that setting the \(n – m = 0\) produce unique values for the remaining \(m\) variables or, equivalently, the columns for the remaining \(m\) variables are linearly independent [24].
Definition 2. Any basic solution to (1) in which all variables are nonnegative is a Basic Feasible Solution(bfs) [24].
Theorem 3. (Extreme point [24]) A point in the feasible region of an LP is an extreme point if and only if it is a basic feasible solution to the LP.
Theorem 4. (Direction of unboundedness [24]) Consider an LP in standard form, having a bfs \(b_1, b_2, \dots, b_{k}\). Any point \(x\) in the LP’s feasible region may be written in the form $$x = d + \sum_{i=1}^{i=k}\sigma_{i}b_{i} $$ where \(d\) is \(0\) or a direction of unboundedness and \(\sum_{i=1}^{i=k}\sigma_{i} = 1\) and \(\sigma_{i} \ge 0.\)
Theorem 5.(Optimal bfs [24]) Consider an LP with objective function max \(cx\) and constraints Ax = b. Suppose this LP has an optimal solution. We now sketch a proof of the fact that the LP has an optimal bfs. If an LP has an optimal solution, then it has an optimal bfs.
Proof. Let \(x\) be an optimal solution to our LP in (l). Because \(x\) is feasible, Theorem (4) tells us that we may write \(x = d + \sum_{i=1}^{i=k}\sigma_{i}b_{i}\), where \(d\) is \(0\) or a direction of unboundedness and \(\sum_{i=1}^{i=k}\sigma_{i} = 1\) and \(\sigma_{i} \ge 0.\) If \(cd > 0\), then for any \(k > 0\), \(kd + \sum_{i=1}^{i=k}\sigma_{i}b_{i}\) is feasible, and as \(k\) becomes larger and larger, the objective function value approaches \(\infty\). This contradicts the fact that the LP has an optimal solution. If \(cd < 0\), then the feasible point \(\sum_{i=1}^{i=k}\sigma_{i}b_{i}\) has a larger objective function value than \(x\). This contradicts the optimality of \(x\). In short, we have shown that if \(x\) is optimal, then \(cd = 0\). Now the objective function value for \(x\) is given by $$cx = cd + \sum_{i=1}^{i=k}\sigma_{i}cb_{i} = \sum_{i=1}^{i=k}\sigma_{i}cb_{i}.$$ Suppose that \(b_1\) is the bfs with largest objective function value. Because \(\sum_{i=1}^{i=k}\sigma_{i} = 1\) and \(\sigma_{i} \ge 0,\) so $$cb_1 \ge cx.$$ Because \(x\) is optimal, this shows that \(b_1\) is also optimal, and the LP does indeed have an optimal bfs.
Also since the edges are undirected, it suffices to include only edges with \( i < j \) in the model. Furthermore, since we are minimizing the total distance travelled during the tour, so we calculate \( d_{ij}\) between each pair of nodes \(i\) and \(j\). So the total distance travelled is the sum of all the distances of the edges which are included in the tour as follows.
Since the tour can only pass through each city exactly once, then each node in the graph should have exactly one incoming and one outgoing edge. i.e., for every \(i\) node, exactly two of \(y_{ij}\) binary variables should be equal to \(2\), and we write it as follows:
Furthermore, eliminating sub tours that might arise from the above constraint, we add the following constraints:
This constraints require that for each proper (non-empty) subset of the set of cities \(V\), the number of edges between the nodes of \(S\) must be at most \(\vert S \vert – 1.\) Therefore, the final integer linear problem of our TSP formulation is as follows:
\begin{equation*} Min \sum_{{(i,j) \in E }} d_{ij} y_{ij} \end{equation*} Subject to: \begin{equation*} \sum_{j \in V } y_{ij} = 2 \, \, \forall i \in V, \end{equation*}We used branch-and-cut algorithm given in [1] to solve TSP.
All vehicles will originate and end at the depot, while each of the customer is visited exactly once. Suppose we have a graph \(G=(\mathcal{V}, \mathcal{E})\), where \(\mathcal{V}, \mathcal{E}\) represent the sets of nodes and weighted edges respectively, let us define the following:
In order to serve each customer once, the route vectors is treated here as a set. The goal of the VRP is to minimize the C\(\mathcal{(S)}\) on the graph \(\mathcal{G}=(\mathcal{V},\mathcal{E})\).
Let \(\mathcal{G}\) is the graph which contains \(\vert \mathcal{E} \vert +2\) vertices, and the customers ranges from \((1,2,\dots, m)\). The starting and returning depots are denoted by \(0\) and \(m+1\) respectively. Earlier in this section, we introduced the vehicle routing problem which we have now defined. However, the problem is not all about visiting the customers, there is more to their demands. In the following definitions, we shall specify these additional demands of the customers:
Note that subtours are avoided in the solution with constraint (12) that is, cycling paths which do not pass through the depot. Advantage of having constraints (12) and (13) in terms of our customers in this problem is that the formulation has a polynomial number of constraints.
We shall solve this formulation using the column generation technique. A brief explanation of this technique is as follow:
Further explanation can be obtain in [24]. Now that we have defined the two algorithms, we proceed to the experiments as given in the next section.
This section presents the performance tests of branch and cut algorithm on Euclidean instances of TSPLIB library. The tests were performed on a computer processor intel(R) core (TM) i5-2450m cpu 2.60GHZ @ 2.60GHT and 8GB of Ram. The adaptation of the proposed algorithm is coded into a python programming language version \(3.6 \) . Result obtained by applying the exact method in solving the symmetric TSP problem is summarized in the tables below.
Instances | Number of Instance | Best Known Solution | BAC Method | Time(sec) | Error(\%) |
---|---|---|---|---|---|
Wi29 | 29 | 27603 | 27603 | 0.10 | 0.0 |
DJ38 | 38 | 6656 | 6656 | 0.12 | 0.0 |
Berlin52 | 52 | 7542 | 7542 | 0.15 | 0.0 |
pr76 | 76 | 21282 | 21282 | 0.66 | 0.0 |
KroA100 | 100 | 108159 | 108159 | 0.62 | 0.0 |
pr136 | 136 | 96772 | 96772 | 0.44 | 0.0 |
pr144 | 144 | 58537 | 58537 | 1.63 | 0.0 |
ch150 | 150 | 6528 | 6528 | 7.44 | 0.0 |
qa194 | 194 | 9352 | 9352 | 1.83 | 0.0 |
KroA200 | 200 | 29437 | 29437 | 1.61 | 0.0 |
The Table 1 shows the results obtained when Exact method was applied on TSP instance. The method give optimality. The optimal tour for these instances are shown in Figures (1),(2) and (3).
The Column Generation (CG) method is an exact method for solving the CVRP and the VRP in general, this technique has been explicitly explained and gives an optimal solution to a problem.
The Table 2 gives the summary of the comparison of this technique’s primal and dual problem, since CG work on dual solution of the relaxed master problem, their optimal gap in percentage. The Table 2 consists of seven columns: Instances (contains the instances written as \(P-n16-k8\) which means the data consists of \(16\) nodes with \(8\) fleets of vehicles), Cities (locations to be visited), Best value (from literature), Relaxed Master Problem (RMP), Column Generation (based on dual values), column generation computational time and optimality gap. From the Table , the optimal gap for all the instances considered gives 0.00%. From the instances we consider in this research, only coordinates and demands for each nodes are given, CG compute the distance between two coordinates; \((x_{1}, y_{1})\), \((x_{2}, y_{2})\), using the Euclidean formula:
Instances | Cities | Best value | RMP (primal) | result (C(S)) | CG time | gap |
---|---|---|---|---|---|---|
P-n16-k8 | 16 | 450 | 450 | 450.00 | 14.72 | 0.00% |
P-n20-k2 | 20 | 220 | 220 | 220.00 | 38.64 | 0.00% |
P-n22-k2 | 22 | 216 | 216 | 216.00 | 44.31 | 0.00% |
P-n22-k8 | 22 | 603 | 603 | 603.00 | 19.66 | 0.00% |
P-n40-k5 | 39 | 458 | 458 | 458.00 | 32.22 | 0.00% |
P-n50-k10 | 49 | 696 | 696 | 696.00 | 38.42 | 0.00% |
P-n101-k4 | 100 | 681 | 681 | 681.00 | 39.16 | 0.00% |
To obtain the optimality gap between the two results, we use the formula in (15). These results were obtained using gurobi solver in python [23]. The optimal tours for the first four instances are given in Figure (4)below.
So far we considered only two variants of the vehicle routing problem which are: travelling salesman problem and capacitated vehicle routing problem. For the travelling salesman problem, we used branch and cut algorithm to solve the problem and applied it on some instances. We considered the following TSPLIB instance; Wi29, DJ38, Berlin52, Pr76, KroA100, pr136, pr144, ch150, qa19 and KroA200. Since technique produced an optimal solution, which ascertain the fact that exacts methods give optimal solutions. The results are shown in the Table (1). For the capacitated vehicle routing problem, we used column generation technique to solve this mathematical model and applied it on Augerat et al. (E) data. These technique produced optimal solutions as well. The results are given in the Table (2).
In this research work, we solved Travelling Salesman Problem and Capacitated Vehicle Routing Problem using branch-and-cut and column generation algorithms, respectively. These techniques: branch-and-bound and column generation produced optimal solutions for travelling salesman problem and capacitated vehicle routing problem respectively. Other variants of Vehicle Routing Problem can also be solved using other exact algorithms.
In future, we can use machine learning techniques such as Neural combinatorial optimization approach to solve the Vehicle Routing Problems.