The vehicle routing problem (VRP) is classified as an NP-hard problem. Hence exact optimization methods may be difficult to solve these problems in acceptable CPU times, when the problem involves real-world data sets that are very large. To get solutions in determining routes which are realistic and very close to the optimal solution, one has to use heuristics and meta-heuristics. In this paper, an attempt has been made to develop a GA based meta-heuristic to solve the time dependent vehicle route problem with time windows (TDVRPTW). This algorithm is compared with five other existing algorithms in terms of minimizing the number of vehicles used as well as the total distance travelled. The algorithms are implemented using Matlab and HeuristicLab optimization software. A plugin was developed using Visual C# and NET Framework 4.5. Results were tested using Solomon’s 56 benchmark instances (of which 24 instances are used with 4 in each of the 6 problem classes) classified into groups such as C1, C2, R1, R2, RC1, and RC2. For each of the performance measures, through a complete factorial experiment with two factors, it is proved that the proposed algorithm is the best among all the six algorithms compared in this paper.
Vehicle Routing Problem (VRP) is one of the most important topics in operations research. It deals with determining least cost routes from a depot to a set of scattered customers. The routes have to satisfy the following set of constraints:
・ Each customer is visited exactly once.
・ All routes start and end at the depot.
・ Sum of all demands on a route must not exceed the capacity of a vehicle.
The vehicle routing problem is depicted in
VRP is closely related to TSP, and according to Bullnheimer et al. [
The vehicle routing problem (VRP) has been very extensively studied in the optimization literature. It started with the seminal papers of Dantzig and Ramser [
The VRP was first stated by Dantzig and Remser [
the items from various suppliers, the 3PL logistics transportation service provider must visit all scheduled suppliers during different opening hours. Some suppliers may further request visits within certain time windows. It is not always easy to meet the time window delivery requirement because the delivery processes are usually affected by traffic flow conditions. The traffic congestion during the rush hours might cause severe delays. Hence in order to pick-up items from the suppliers more efficiently, this study seeks to solve several challenging missions simultaneously among customers and suppliers, in a 3PL kind of arrangement, whereby the buyer’s vehicle visits the suppliers’ sites to pickup the items ordered, in an e-commerce setup, including: 1) to satisfy suppliers’ specific time windows; 2) to approximate travel time affected by urban traffic.
In this paper, the basic vehicle routing problem with time windows (VRPTW) is further extended and the time dependent vehicle routing problem with time windows is studied. The TDVRPTW is gaining more importance in research, since the traffic conditions are different during different times of the day and manufacturers, suppliers and ecommerce retailers need to schedule their pickups and deliveries at the appropriate times of the day, considering the time windows of the customers and suppliers to make their order fulfillment needs efficient and faster. The methodology adopted in this study is based on genetic algorithm. It is important to make this study, since a gap exists in the literature in the area of TDVRPTW used by ecommerce companies in supplier site pickups. This study may help ecommerce companies to optimize their supplier pickup activity.
In this paper, the review of literature of VRPTW is followed by genetic algorithm used and the crossover technique developed in this study. The implementations of the GA-based algorithm for solving the TDVRPTW and its steps are also discussed. Finally the proposed algorithm is compared with a set of existing algorithms in terms of number of vehicles utilized as well as total distance travelled.
The VRPTW is classified as a NP-hard problem (e.g. Fu, [
Many of the most successful meta-heuristics for the large VRPTW instances are based on some form of parallel computation. During the past few years, numerous papers have been written on generating good solutions for VRPTW with GAs. Genetic Algorithms (GA for short) are a class of adaptive heuristics based on the Darwinian concept of evolution survival of the fittest. A brief review of the relevant literature is given below.
Le Bouthillier and Crainic [
Homberger and Gehring [
Time dependent vehicle routing problems received little attention among researchers. The time dependent VRP was first formulated by Malandraki [
An important property for time dependent problems is the First In-First Out (FIFO) property proposed by Ahn and Shin [
Donati et al. [
An important real-life property found in transportation problems in the retail industry are time-dependent travel times, also known as dynamic travel times, where travel time depends on the time of departure, modeling traffic conditions such as rush hours. The VRP with dynamic travel times is described by van Woensel et al. [
Jung and Haghani [
Genetic Algorithm was first developed by J. Holland at the University of Michigan in 1975. Solutions to a combinatorial problem are encoded as chromosomes. The chromosomes are evaluated for their fitness by an evaluation function, and good properties of a generation of solutions are propagated to the following generations.
The genetic algorithms typically have the following structure. A typical genetic algorithm (GA) will start with a set of chromosomes called the initial population. Each chromosome represents a solution to the problem. The initial population is either randomly generated (in which case it would take longer time for the algorithm to converge to the solution) or generated using some form of heuristics (in which case the population is already closer to the solution, and would hence take less time to converge). The next step in the GA method is the selection mechanism where the selection of the prospective parents based on their fitness is carried out and which is computed by the evaluation function. The selected parent chromosomes will then be recombined via the crossover operation to create their offspring. After the crossover process, the next step will be to mutate a small number of the newly obtained offspring, in order to introduce a level of randomness that will preserve the GA from converging to a local optimum. A mutation is typically a random swap in a gene sequence, or a random negation of a bit if the offspring is bit-encoded. Finally, new population will then be formed by substituting the offspring in place of their corresponding chromosomes.
The genetic algorithm will continue through this process until a stopping criterion is met, which can be one of the following:
・ predefined number of generations has been produced;
・ there was no improvement in the population, which would mean that the GA has found an optimal solution;
・ a predefined level of fitness has been reached.
Tournament SelectionIn this study, tournament selection method is used as the method of selecting the parent chromosomes for crossover operation. In tournament selection, two identical (though differently ordered) copies of the population are kept. In every generation, adjacent chromosomes in one copy of the population pair by pair are compared, and the chromosome with greater fitness value (lower fitness value in this case because we are minimizing the total distance travelled) is selected. Then the second copy of the population in treated the same way to select the other half of the selected population.
In this section, the methodology used to develop the genetic algorithm-based solution for the time-dependent vehicle routing problem with time windows (TDVRPTW) is given. A new crossover technique called the random sequence insertion-based crossover (RSIX) is described in detail.
The representation of the chromosome as a set of genes representing the nodes in a route is shown in
In
A crossover operator is a major process of producing offspring from the current population. There are many methods for crossover operation according to different problems. In this paper, “Random Sequence Insertion- Based Crossover” Kumar and Panneerselvam [
Consider two parent chromosomes with seven genes in each of them as shown in
The steps of the Random Sequence Insertion-based Crossover (RIX) method are presented below.
Step 1: Two chromosomes are randomly chosen as parents.
Step 2: Generate two crossover points, which will lead to three segments in each chromosome as shown in
Step 3: Next, swap the middle crossover genes segment, as in
Step 4: Next validity checking is carried out, taking into consideration the constraints of VRPTW, with each demand point (customer node) allowed to be visited once, and if we assume triangular inequality, i.e.
Step 5: This results in getting two new offspring with crossover gene segment and they are saved to the next generation as shown in
・ The new offspring are tested for fitness values.
・ The smaller the “fitness-value”, the stronger road chromosome is obtained.
According to Sivasankaran and Shahabudeen [
While assigning a customer ID into a node, that road pertaining to all the models should be assigned to the same node. If a road is available in only one model then that can be independently assigned to the current node.
Every road or route chromosome has its own fitness value, defined as fitness value, where
1) Fitness value = The sum of route distance cost for every road in a route chromosome.
2) The smaller the “fitness value” value, the stronger road chromosome is obtained.
3) Every chromosome is initialized as nodes which contain the source location and the destination location, which are fixed at the start and end of the array.
The steps of the proposed genetic algorithm (SNRPGA) for the time dependent vehicle routing problem with time windows are presented below.
Step 1: Input the following:
・ Number of customer nodes (n).
・ Number of vehicles (k).
・ Capacity of the vehicles (a).
・ Set Generation Count (GC) = 1.
・ Maximum number of generations to be carried out (MNG) = 1000.
Step 2: Generate a random initial population (L) of 100 (N) chromosomes (suitable solutions routes for the problem).
Step 3: Evaluate the fitness function f(x) of each chromosome in the population L.
Step 4: Selection.
Sort the population L by the objective function (fitness function) value in the ascending order, since the objective of the study is minimization of the total distance travelled. Copy a top 30% of the population to form a subpopulation S rounded to the whole number. Smaller fitness value is preferred here.
Step 5: Randomly select any two unselected parent chromosomes from the subpopulation S. Let them be c1 and c2 using tournament selection.
Step 5.1: Perform two-point random Cross-Over using the random sequence insertion-based crossover (RSIX) described in the earlier section among the chromosomes c1 and c2 to obtain their offspring d1 and d2 by assuming a crossover probability of 0.7.
Step 5.2: Perform mutation on each of the offspring using a mutation probability of 0.3.
Step 5.3: Evaluate the fitness function with respect to the total distance travelled and number of vehicles utilized value for each of the offspring d1 and d2.
Step 5.4: Replace the parent chromosomes c1 and c2 in the population with the offspring d1 and d2, respectively, if the fitness function of the offspring is less than that of the parent chromosomes.
Step 6: Increment the generation count (GC) by 1.
i.e., GC = GC + 1.
Step 7: If GC ≤ MNG, then go to step 4, else go to step 8.
Step 8: The topmost chromosome in the last population serves as the solution for implementation.
Print the tour along with the total distance travelled and number of vehicles used.
Step 9: Stop.
The time dependent vehicle routing problem with time windows plugin for HeuristicLab using genetic algorithm was implemented using Visual C#. The standard test data used as input for the solving the TDVRPTW using genetic algorithm (GA) is the Solomon’s 56 benchmark instances.
The input parameters of the vehicle routing problem with time windows are listed below.
1) Number of nodes (customer locations) = 100.
2) Vehicle capacity = C1 = 200, C2 = 700, R1 = 200, R2 = 1000, RC1 = 200, RC2 = 1000.
3) Number of Vehicles = 25.
4) The demand at each customer location is given.
5) Distance of the customer location from the depot and from each other is given in the distance matrix.
The comparison of proposed algorithm is done in two stages as listed below.
・ Comparison of the proposed algorithm with five existing algorithms in terms of number of vehicles utilized.
・ Comparison of the proposed algorithm with five existing algorithms in terms of total distance travelled.
The experiments were run on a computer with Windows 8.1 OS and an Intel Core i3, 1.70 GHz Processor (CPU). The 56 benchmark instances are divided into 6 groups or classes C1, C2, R1, R2, RC1, RC2.
In this section, the proposed genetic algorithm is compared with five existing algorithms to solve the vehicle routing problem with time windows using a complete factorial experiment with two factors, viz. “problem Size” and “Algorithm”. The primary objective is to minimise the number of vehicles and the secondary objective is to minimise the total distance travelled, which is the same objective of the study of Figliozzi [
The model of ANOVA is given as below:
where,
Yijk is the number of vehicles utilized w.r.t the kth replication under the ith treatment of factor A (Problem Size) and the jth treatment of factor B (Algorithm), i.e. jth Algorithm.
μ is the overall mean of the response variable.
Ai is the effect of the ith treatment of factor A (Problem Size) on the response variable.
Bj is the effect of the jth treatment of factor B (Algorithm) on the response variable.
ABij is the interaction effect of the ith Problem Size and jth Algorithm on the response variable.
eijk is the random error associated with the kth replication under the ith Problem Size and the jth Algorithm.
In this model, Factor A (Problem Size/Problem Class) is a random factor and the Factor B (algorithm) is a fixed factor. Since the factor A is a random factor, the interaction factor ABij is also a random factor. The replications are always random and the number of replications under each experimental combination is k. The derivation of the expected mean square (EMS) is given in Panneerselvam [
The alternative hypotheses of the model are as given below.
H1: There are significant differences between the different pairs of treatments of Factor A (Problem Size) in terms of the number of vehicles utilized.
H1: There are significant differences between the different pairs of treatments of Factor B (Algorithm) in terms of the number of vehicles utilized.
H1: There are significant differences between the different pairs of interaction between Factor A and Factor B in terms of number of vehicles utilized.
The ANOVA results of the data given in
Algorithm (B) | |||||||
---|---|---|---|---|---|---|---|
Replication | Solomon | CTA | Gideon | GenSAT | SNRPGA | Tabu | |
Problem size/problem class (A) | R1 1 | 21 | 19 | 20 | 18 | 10 | 18 |
R1 2 | 19 | 17 | 17 | 17 | 10 | 20 | |
R1 3 | 14 | 15 | 13 | 13 | 10 | 16 | |
R1 4 | 15 | 15 | 15 | 14 | 10 | 16 | |
C1 1 | 10 | 10 | 10 | 10 | 9 | 10 | |
C1 2 | 10 | 10 | 10 | 10 | 9 | 10 | |
C1 3 | 10 | 10 | 10 | 10 | 9 | 11 | |
C1 4 | 10 | 10 | 10 | 10 | 10 | 10 | |
RC1 1 | 16 | 16 | 15 | 14 | 11 | 17 | |
RC1 2 | 15 | 14 | 14 | 13 | 10 | 15 | |
RC1 3 | 16 | 12 | 14 | 14 | 11 | 13 | |
RC1 4 | 13 | 15 | 12 | 13 | 10 | 16 | |
R2 1 | 4 | 4 | 4 | 4 | 3 | 6 | |
R2 2 | 4 | 4 | 4 | 4 | 3 | 5 | |
R2 3 | 3 | 3 | 3 | 3 | 2 | 4 | |
R2 4 | 4 | 3 | 3 | 3 | 2 | 4 | |
C2 1 | 3 | 3 | 3 | 3 | 3 | 3 | |
C2 2 | 3 | 3 | 3 | 3 | 3 | 4 | |
C2 3 | 3 | 3 | 3 | 3 | 3 | 4 | |
C2 4 | 4 | 3 | 3 | 3 | 3 | 4 | |
RC2 1 | 4 | 4 | 4 | 4 | 3 | 7 | |
RC2 2 | 4 | 4 | 4 | 4 | 3 | 7 | |
RC2 3 | 4 | 4 | 4 | 4 | 3 | 4 | |
RC2 4 | 5 | 4 | 4 | 3 | 3 | 6 |
The standard error used in this test is computed as shown below using the mean sum of squares of the interaction terms (Problem Size × Algorithm) and the number of replications under each of the algorithms (24).
The least significant ranges (LSR) are calculated from the significant ranges of Duncan’s multiple range tests table for α = 0.05 and 25 degrees of freedom as shown in
The results of Duncan’s multiple range test are shown in
The proposed GA-based meta-heuristic (SNRPGA) is compared with five other existing meta-heuristics, viz. Solomon [
The model of ANOVA is given as below:
where,
Yijk is the total distance travelled w.r.t the kth replication under the ith treatment of factor A (Problem Size) and the jth treatment of factor B (Algorithm).
μ is the overall mean of the response variable total distance travelled.
Ai is the effect of the ith treatment of factor A (Problem Size) on the response variable.
Bj is the effect of the jth treatment of factor B (Algorithm) on the response variable.
ABij is the interaction effect of the ith Problem Size and jth Algorithm on the response variable.
eijk is the random error associated with the kth replication under the ith Problem Size and the jth Algorithm.
Source of variation | Sum of squares | Degrees of freedom | Mean square | Calculated F ratio | F ratio (α = 0.05) | Remark |
---|---|---|---|---|---|---|
Problem size (A) | 3585.035 | 5 | 717.007 | 527.59897 | 2.32 | Significant |
Algorithm (B) | 139.29 | 5 | 27.857 | 6.3746 | 2.32 | Significant |
Problem size × algorithm (AB) | 109.25 | 25 | 4.37 | 3.216 | 1.64 | Significant |
Error | 146.750 | 108 | 1.359 | |||
Total | 3980.326 | 143 |
Range j | Significant range | Standard error | LSR = significant range × standard error |
---|---|---|---|
2 | 2.900 | 0.4267 | 1.2383 |
3 | 3.070 | 0.4267 | 1.3100 |
4 | 3.150 | 0.4267 | 1.3441 |
5 | 3.225 | 0.4267 | 1.3761 |
6 | 3.275 | 0.4267 | 1.3974 |
In this model, the factor A is a random factor and the factor B is a fixed factor. Since the factor A is a random factor, the interaction factor is also a random factor. The replications are always random and the number of replications under each experimental combination is k. The derivation of the expected mean square (EMS) is given in Panneerselvam [
The alternative hypothesis of the model is stated as below:
H1: There are significant differences between the different pairs of treatments of Factor A (Problem Size) in terms of the total distance travelled.
H1: There are significant differences between the different pairs of treatments of Factor B (Algorithm) in terms of the total distance travelled.
H1: There are significant differences between the different pairs of interaction between Factor A and Factor B in terms of total distance travelled.
From the ANOVA results shown in
Algorithm (Factor B) | |||||||
---|---|---|---|---|---|---|---|
Replication | Solomon | CTA | GIDEON | GenSAT | SNRPGA | TABU | |
Problem size/problem class (Factor A) | 1 R1 | 1873 | 1734 | 1700 | 1644 | 1016 | 1749 |
2 R1 | 1843 | 1881 | 1549 | 1493 | 963 | 1527 | |
3 R1 | 1484 | 1530 | 1448 | 1442 | 1096 | 1340 | |
4 R1 | 1673 | 1535 | 1363 | 1350 | 1000 | 1542 | |
1 C1 | 968 | 934 | 904 | 829 | 829 | 914 | |
2 C1 | 1059 | 956 | 926 | 829 | 829 | 1005 | |
3 C1 | 1282 | 1130 | 928 | 835 | 828 | 907 | |
4 C1 | 904 | 926 | 957 | 835 | 825 | 946 | |
1 RC1 | 1867 | 1851 | 1767 | 1669 | 1292 | 1766 | |
2 RC1 | 1760 | 1644 | 1569 | 1557 | 1161 | 1649 | |
3 RC1 | 1673 | 1465 | 1612 | 1602 | 1230 | 1632 | |
4 RC1 | 1922 | 1809 | 1608 | 1420 | 1128 | 1537 | |
1 R2 | 1741 | 1786 | 1478 | 1354 | 748 | 1344 | |
2 R2 | 1730 | 1736 | 1279 | 1176 | 820 | 1248 | |
3 R2 | 1578 | 1309 | 1274 | 8338 | 720 | 1187 | |
4 R2 | 1542 | 1392 | 1269 | 1052 | 773 | 1160 | |
1 C2 | 731 | 664 | 753 | 591 | 589 | 737 | |
2 C2 | 811 | 653 | 756 | 707 | 588 | 759 | |
3 C2 | 758 | 684 | 855 | 791 | 588 | 742 | |
4 C2 | 730 | 670 | 803 | 685 | 588 | 691 | |
1 RC2 | 2103 | 1959 | 1823 | 1294 | 970 | 1577 | |
2 RC2 | 1799 | 1858 | 1594 | 1291 | 794 | 1404 | |
3 RC2 | 2134 | 1521 | 1530 | 1389 | 810 | 1494 | |
4 RC2 | 1632 | 1988 | 1501 | 1213 | 805 | 1392 |
Source of variation | Sum of squares | Degrees of freedom | Mean sum of squares | Calculated F ratio | F ratio (α = 0.05) | Remark |
---|---|---|---|---|---|---|
Problem size (A) | 17,565,288.891 | 5 | 3,513,057.778 | 9.536 | 2.30 | Significant |
Algorithm (B) | 6,160,662.029 | 5 | 1,232,132.406 | 2.93 | 2.30 | Significant |
Algorithm × problem size (AB) | 10,515,346.157 | 25 | 420,613.846 | 1.141 | 1.61 | Insignificant |
Error | 39,787,307.795 | 108 | 368,400.998 | |||
Total | 74,028,604.872 | 143 |
algorithms compared in terms of the total distance travelled, Duncan’s multiple range test is next conducted to identify the best algorithm by arranging the algorithms in the descending order of their mean total distance travelled from left to right as shown in
The treatment means for the Factor B (Algorithm) in terms of the total distance travelled are arranged in the descending order from left to right. The standard error for the performance measure is calculated using the formula and found to be 132.3842. One can notice the fact that the mean sum of squares of the interaction term AB is used in estimating the standard error (SE), because the F ratio for the factor “Algorithm” is obtained by dividing its mean sum of squares by the mean sum of squares of the interaction term ABij (Panneerselvam [
The least significant ranges (LSR values) are calculated from the significant ranges of Duncan’s multiple range test table for α = 0.05 and 25 degrees of freedom. These are shown in
Next by comparing the actual differences between the various treatment means of Factor B (Algorithm) with the corresponding calculated LSR values as shown in
No. of treatments − 1 (j) | significant range | Standard error | LSR = significant range × standard error |
---|---|---|---|
2 | 2.900 | 132.3842 | 383.9142 |
3 | 3.070 | 132.3842 | 406.4195 |
4 | 3.150 | 132.3842 | 417.0102 |
5 | 3.225 | 132.3842 | 426.9391 |
6 | 3.275 | 132.3842 | 433.5583 |
total distance travelled for the proposed algorithm is the least among all the algorithms. Hence, it is concluded that the proposed algorithm (SNRPGA) is the best among all the algorithms with respect to the total distance travelled.
In this research, a GA based meta-heuristic is developed using Random Sequence-based Insertion Crossover (RSIX) method (SNRPGA) for solving the time dependent vehicle routing problem (TDVRP) with time windows. It is compared with five other existing mete-heuristics in terms of two performance measures, viz. number of vehicles utilized and total distance travelled. Through a complete factorial experiment with two factors, viz. “Problem Size” and “Algorithm”, it is proved that there are significant differences among the algorithms in terms of the number of vehicles utilized. So, in the next stage using Duncan’s multiple range test, it is found that the proposed algorithm “SNRPGA” is the best among all the algorithms in terms of minimizing the number of vehicles utilized.
Next, through another factorial experiment with two factors, viz. “Problem Size” and “Algorithm”, it is proved that there are significant differences among the algorithms in terms of the total distance travelled. So, in the next stage using Duncan’s multiple range test, it is found that the proposed algorithm “SNRPGA” is the best among all the algorithms in terms of minimizing the total distance travelled.
This study can be useful for planning the supplier site pickups by e-commerce companies, taking into consideration of traffic conditions during different periods of the day with time window requirements of the suppliers. Future researchers can implement the TDVRP using other meta-heuristics and compare the efficiencies of the various meta-heuristics. The Solomon’s benchmark instance is got from SINTEF [
The authors wish to express their deepest gratitude to the researchers Mr. Andreas Scheibenpflug and Mr. Philipp Fleck of FH Hagenberg, Austria, for their help.
SureshNanda Kumar,RamasamyPanneerselvam, (2015) A Comparative Study of Proposed Genetic Algorithm-Based Solution with Other Algorithms for Time-Dependent Vehicle Routing Problem with Time Windows for E-Commerce Supply Chain. Journal of Service Science and Management,08,844-859. doi: 10.4236/jssm.2015.86085