• No results found

A variant of the Traveling Salesman Problem for attended home delivery.

N/A
N/A
Protected

Academic year: 2021

Share "A variant of the Traveling Salesman Problem for attended home delivery."

Copied!
18
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

A variant of the Traveling Salesman Problem for attended home

delivery.

F. N. Mol

(2)

Master’s Thesis Ecomometrics, Operations Research and Actuarial Studies Specialization: Operations Research

(3)

Master’s Thesis

A variant of the Traveling Salesman

Problem for attended home delivery.

Author: F.N. Mol

August 30, 2016

Abstract

(4)

1

Introduction

Whenever a package deliverer can not deliver a package to a customer because this customer is not at home, the deliverer needs to revisit this customer at another time, a cycle that repeats until the customer is at home during a delivery. Package delivery companies determine their routes as if all customers are always at home, even though this is not the case. The deliverer has to visit all customers, and only knows whether a customer is at home when he arrives at that given customer. There is some information could give an indication of the chance of the customers being at home at a given time. For example, a customer could have a low chance of being at home during the morning, but a high chance of being at home in the afternoon. The delivery company can use this information to deviate from the shortest route to visit all customers, which causes an increase in the length of the route, but can result in a larger expected number of customers being at home during their delivery. This in turn results in a shorter expected route length to revisit all customers who were not at home during delivery. The deliverer will accept this route if the de-crease in the expected route length for the revisit is larger than the inde-crease in the length of the first visit. To model the above defined problem we consider two routes: a day-route and an evening-route. The day-route is split up, such that all customers have two probabilities, where the first probability is used if the length up to that customer is lower than the given split-length, and the second probability is used in all other cases. For the day-route, all customers need to be visited, which gives the Traveling Salesman Problem (TSP), as in Applegate et al. (2006). For the evening-route, we want to calculate the expected route length given the probabilities determined by the day-route, so that we can evaluate the effects the modifications on the day-route have on the evening-route. For each customer the probability is used depending on if the customer is visited during the day before the split or after, which results in a Probabilistic Traveling Salesman Problem (PSTP), as in Jaillet (1985). We will determine two sequences of customers. The first sequence is the order in which all customers will be visited in the day-route. The second sequence is the order in which the customers will be visited in the evening, where all customer who were at home during the day-route will be left out from this sequence. This is called an a priori route for the PTSP (Jaillet, 1985). The objective is to minimize the sum of the length of the day-route and the expected length of the evening-route.

Studies on the TSP, and all studies that have build on the principle of the TSP, optimize the model such that the route is selected with the shortest route length (Applegate et al., 2006). The aim of this thesis is to present a trade-off, where on the one hand we we want a short route length and on the other hand we want a high success on delivery. We determine this trade-off by assuming that all the customers who were not at home during their visit will be revisited in the evening. In this thesis, we will present a mathematical model for the above described problem. In addition to that, we will construct a heuristic which will solve the problem presented above. A set of instances will be created to give numeric solutions, so that we can compare the heuristic to a benchmark, where this benchmark method will use the approach which first solves the day-route while neglecting the probabilities of the customers being at home.

(5)

These two examples, using two-phases and using probabilities for customers who need to be visited, are the closest to the main problem described above.

We are combining the TSP and the PTSP into one problem. Since the TSP is a NP-hard problem Applegate et al. (2006) and the PTSP is a NP-hard problem Jaillet (1985), we can say that, by defi-nition of computation complexity, a combination of these two problems is also NP-hard. To determine the time complexity of an enumeration approach, we have to note that the first phase, the day-route, has impact on the probabilities for the second phase, the evening-route, we can not solve this problem by first solving the first-phase, and then solving the second-phase for an optimal solution. Hence, an ennumeration consists of all possible evening-routes for every day-route. For n customers, the day-route has n! different solutions. Note, that the day-route is asymmetric. The lengths are symmetric, but mir-roring the customer sequence will affect the probabilities for the evening-route. The evening-route has (n − 1)! different solutions. Hence, we have a time complexity of O(n!) for the asymmetric TSP and a time complexity of O((n − 1)!) for enumerating all solutions of the symmetric PTSP. For each solution of the PTSP, the expected length of the a priori route has to be calculated, which has a time complexity of O(n2). Combining, gives a time complexity of O((n − 1)!)n2. Hence, we have a time complexity for

the problem which is O(n! · (n − 1)! · n2) for solving the problem by enumeration. Note, that this is an

enormous increase in the number of possible solutions compared to the normal symmetric TSP.

In Section 2 the problem will be described as a mathematical model. In Section 3 the heuristic, in the framework of the Genetic Algorithm, will be proposed. In Section 4 a data set will be presented, a benchmark will be defined and computational experiments will be summarized and discussed. Finally, in Section 5 the conclusion of the research will be drawn and further research opportunities will be presented.

2

Problem Description

Consider n customers spread out in a Euclidean space, with probabilities pitof customer i being home,

for all customers i ∈ [0, ..., n], where customer 0 represents the depot, and part of the day t ∈ [1, 2], where t = 1 corresponds to the morning and t = 2 corresponds to the afternoon. Between every pair of distinct customers, there exists an Euclidean length dij ∈ R+ for customers i, j ∈ [1, ..., n]. Since we consider

symmetry, we have by definition that dij= dji. We implement the depot as customer 0, with p0t= 0 for

t ∈ [1, 2]. Hence, we treat the depot as a customer which is not at home at delivery, since we want to end the evening-route at the depot with probability equal to 1. The objective is to minimize the sum of the length of the day-route (the TSP route) and the expected length of the evening-route (the PTSP route). For the day-route, consider a permutation of customers for the day-route µ(.), where µ(i) is the number

n number of customers

pit probability of customer i at time t

dij length between customer i and j

µ permutation day-route

λ permutation evening-route

s split distance

Table 1: Variables of the mathematical model.

(6)

Hence, for the day-route, we have the following objective: min n X i=0 dµ(i),µ(i+1) (1)

for all possible permutations µ.

Consider the split length s ∈ R+, where we have that when s is exceeded, the morning is ended and

the afternoon starts. For a customer at the k-th place in the customer sequence of the day-route, the probability of being home is pi1 if and only if the length until that customer is lower than s. Hence, the

probability that customer i does not have to be visited in the evening-route is

pi=

(

pi1, if ,Pk−1i=0 dµ(i),µ(i+1)< s

pi2, otherwise

(2)

for all k ∈ [0, ..., n]. Hence, Equation 1 determines the probabilities for the evening-route.

The expected length of an a priori route of the PTSP is calculated as in Bianchi et al. (2003), which is presented in Equation 3. Consider λ(.) to be a permutation of customers which represents an a priori route, where the permutation is defined similar as the permutation µ(.).

E[Lλ] = n−2 X θ=0   n X j=1 dλ(j),λ(j+θ+1)· (1 − pλ(j),t)(1 − pλ(j+θ+1),t) θ Y k=1 (pλ(i+k),t)   (3)

We use one minus the probabilities in Equation 3, compared to the expcted value in Bianchi et al. (2003). This is needed since pit represents the probabilities of customer i being at home at time t, hence, 1 − pit

represents the probability of customer i needs to be revisited during the evening-route.

Summing up both objectives, we get the following objective of the combined problem as is given in Equation 4. min n X i=1 dµ(i),µ(i+1)+ n−2 X θ=0   n X j=1 dλ(j),λ(j+θ+1)· (1 − pλ(j),t)(1 − pλ(j+θ+1),t) θ Y k=1 (pλ(i+k))   (4)

As was discussed in Section 1, the expected value of an a priori PTSP route as presented above has a long running time. Using the fact that a heuristic method, which we want to develop, is an iterative process, we expect that the expected length of the evening-route will be recalculated a lot. This is the case for every adjustment in the day-route which changes the set of probabilities used for the evening-route, and for every adjustment of the evening-route itself. Hence, we want to use an approximation of the expected a priori route of the PTSP, as in Equation 3. The method we use to approximate of the expected length of an a priori PTSP route is as in Bianchi et al. (2003). Consider θ to be the depth of the realization. This implies that the size of θ determines which graphs will be includes in the approximation. For example, if θ = 0, we will only use all the edges dλi,λi+1∀i ∈ [1, ..., .n]. If we use θ = 1, we will use

the edges dλi,λi+1∀i ∈ [1, ..., .n − 1] and dλi,λi+2∀i ∈ [1, ..., .n − 2] to calculate the approximation. The

approximation of the expected value of the a priori route is given in Equation 5.

(7)

3

Genetic Algorithm

The framework we use to construct the heuristic algorithm, that is used to generate a solution, is the Genetic Algorithm (Holland, 1975). The Genetic Algorithm is a heuristic method which generates an population of solutions, and based on the idea of evolution selects chromosomes which generate an offspring and selects a part of the population which will be extinguished. During each life cycle, mutations take place in the chromosomes and (a part) of the population will be educated. In terms of the solution this implies that the solution of a chromosome will be improved by, for example, iterative improvement. The Genetic Algorithm is a heuristic which has been used for more complex optimization problems in routing (Ho et al., 2008), (Vidal et al., 2012), (Vidal et al., 2013). One of the main advantages of using a Genetic Algorithm is the high diversity by having a number of (different) solutions which interact with each other, and the use of mutation operators. For the problem we are facing, this is useful since we are looking for day-routes which are short, but also result in favorable probabilities which can result in a lower objective value. We first need to compute the day-route before we can compute the expected value of the evening-route, as described in Section 2, and hence we want a high diversity in the day-routes. However, since the evening-route does not affect the day-route, we are strictly aiming to minimize the expected evening-route length, but the set of probabilities do change when the day-route is modified. Hence, the education seems appropriate to improve the evening-route.

Algorithm 1 Genetic Algorithm Step 1: Initialize population

Step 2: while computation time < tmax and number of iterations without improvement < mitt

Step 3: Parent Selection Step 4: Generate Children

Step 5: Mutation

Step 5: Education step on children

Step 6: Add children to population and reduce population Step 7: end while

Step 8: Return solution with the lowest route length

The general framework for the Genetic Algorithm we use is based on the heuristic as in Vidal et al. (2012). Extracting the extensions, we get the following framework of the Genetic Algorithm, as presented in Algorithm 1. Every step of the Genetic Algorithm has it’s own operation. Hence, these operations will be explained in the next sections, but at first the representation of the solution will be given below.

3.1

Solution Representation

The information needed for a solution are two sequences of all n customers, one sequence of customers for the day-route and one sequence of customers for the evening-route. The objective value can then me calculated, given distances dij, split distance s and probabilities pit. Since the sequence for the day-route

and the sequence of the evening-route both consist of all n customers, we denote both sequences the same way. Since we still want to distinguish between these two routes, an 2 × n array is used to represent a solution. The first row of the array represents the deterministic day-route and the second row of the array represents the a-priori evening-route. The first column contains the number of the customer which will be visited first from the depot, the last column contains the number of the customer which will be visited last, and from this customer the deliverer will return to the depot.

(8)

• For the day-route: the deliverer starts at customer 8, then he visits customer 3, after that customer 9, and keeps visiting the customers in order of the columns. Hence, he visits customer 7 at last, and after that he returns to the depot.

• For the evening-route: since this is an a priori route, we have that route depends on the customers being home during the day visit. If none of the customers were at home during the day-route, then the deliverer has to visit all customers. If all customers were at home, the deliverer does not have to make an evening delivery at all. If some customers were at home, and some not, the deliverer will leave out the customers who were at home but keeps the sequence as presented in the second row. Hence, if for example customer 9 and customer 1 were at home, and customer 2 was not at home, the evening-route will start at customer 2.

Figure 1: Example of a solution using an instance consisting of 10 customers. The upper row represents a deterministic route and the bottom row represents an a prior route.

Since the Genetic Algorithm consists of a population of c solutions, we use an c × 2 × n array for the whole population.

The objective value is calculated by adding the deterministic length of route one, i.e. adding the lengths from each consecutive customer. As in the example solution given in 1, we would add the lengths of the depot to customer 8, customer 8 to customer 3, customer 3 to customer 9 etc. While computing the route length, at every customer there will be examined if the route length exceeds s, such that the probabilities can be determined for the evening-route. The number in the sequence of this customer is stored such that the probabilities are easily be retrieved for computing the expected length of the evening-route. Since the evening-route is an a-priori route, we will use the expected length using the probabilities are determined by the first route. Considering the computation time, and the fact that the objective value has to be calculated for every offspring and after each operator on the evening-route, we decide to use an approximation of the expected length, as was presented in Section 2.

3.2

Initial Solution

The initial population is generated by two different methods. At first, for all c chromosomes, the day-route and the evening-day-route will, separately, be generated by randomized permutations of the sequence of customers. Then, n nearest neighbour solutions are generated. Each nearest neighbour solutions starts with a different customer, i.e. the customer will be placed at the first index of the customer sequence. Then for all solutions, the nearest neighbour approach starts at the customer at the first index, the nearest customer, who is not yet in the customer sequence, will be added to the customer sequence. This step will be repeated until customers are in the customer sequence. n chromosomes are then selected at random and will have their day-route replaced by one of these n nearest neighbour solutions. Again, n chromosomes are selected at random, but now their evening-route will be replace by one of these n nearest neighbour solutions.

3.3

Parent Selection

(9)

the parents by chance, where the parents with a lower objective value have a higher probability of being chosen. The probabilities are determined by the difference between the objective value of a chromosome with the maximum objective value of population, divided by the sum of all differences, as in Liu (2010).

3.4

Generate Children

When the parents are selected, the offspring will be generated. Each chromosome of the offspring will be generated by a subset of the selected parent chromosomes. For every pair of parents, two children chromosomes will be generated. Since the half of the population is used as first parent, and again a half of the population is used as second parent, we have that the number of parents equals the population size. Hence, since two children will be generated for each couple of parents, the number of children in each iteration equals the population size. I.e. the population size will be doubled.

The children will be generated by using a crossover operator. The operator used is the PMX-operator Larraaga et al. (1999), which is a TSP crossover operator. This operator will be used on the day-route and the evening-route, independent of each other. Since the day-route and the evening-route are of the same form, we present the operation one route. The concept stays for both routes exact the same. The operator works as following:

1. The first step is to select two random, distinct integers between 1 and n, the number of customers. We denote `1 and `2 as the random integers, where 1 ≤ `1< `2≤ n.

2. The first child will have a part of the route copied from customer at the index `1until the customer

at index `2 from the second parent. The second child will have the route part from index `1 to

index `2 copied from the first parent.

3. All customers at indices i with i < `1and i > `2 will be copied for child 1 from parent 1. However,

if this customer does already exist in the sequence of child 1, the mapping for that given customer from parent 2 to parent 1 will be copied.

An example of the PMX-operator will be given using only one route for each parent and child. Consider two parents, P 1 and P 2, which denote parent 1 and parent 2 respectively. Generate two random integers, `1= 3 and `2= 6. Copy the route sequence from index 3 until 6 from parent 2 into child 1, and likewise

for child 2 from parent 1. This first step, including the parents is depicted in Figure 2.

The next step is copy all customers who are not in the sequence yet from the other parent. This is

Figure 2: The first step of the PMX-crossover. The sequences from index 3 until 6 are copied in to a child.

shown in Figure 3. The customer at the first index of P1, customer 8, is already in the sequence of the

(10)

the first parent. This customer is not yet in the route of the child, and hence customer 3 will be copied at the second index. Note that for this example shows the PMX-operations on one route. The same

Figure 3: The second step of the PMX-crossover. The empty indices of the offspring are filled up by mappings from the other parent as in step 1.

operation will be done for the other route, i.e. if this example was a PMX-operation on the day-route, the next step will be a PMX-operation with the same parents P 1 and P 2, but now on the evening-route.

3.5

Mutation

To get diversity in the day-route, we make use of mutation operators. These operators will be done on a fraction fmut of the generated offspring in an iteration. The mutation of a chromosome will be added

to the population. We make use of two mutation operators, the heuristic mutation operator and the inversion heuristic operator (Ho et al., 2008). For each selected chromosome which will be mutated, both mutation operators are used.

The heuristic mutation operator, as in Ho et al. (2008), selects three distinct indexes of the day-route array at random. Then, a mutation for this chromosome holds a permutation of these three indexes. As Ho et al. (2008) suggests, the original heuristic mutation operator only selects the best solution of the given neighbourhood, but to improve the diversity, all solutions in the neighbourhood will be added to the population. To give an example we use the chromosome presented in Figure 1. The three randomly drawn indexes are `1 = 2, `2 = 5, `3 = 7. Then, 5 mutations will be generated, namely, all possible

permutations for these three indices. One of the mutations is presented in Figure 4. The inversion

(11)

mutation operator, as in Ho et al. (2008), selects two distinct indices of the day-route array at random, index `1and index `2. Then, the mutation for this chromosome is generated by inverting the sequence of

customers starting from `1and ending at index `2. To give an example we use the chromosome presented

in Figure 1. The three randomly drawn indexes are `1 = 2, `2= 7. Then, 1 mutation will be generated

as presented in Figure 5.

Figure 5: The inversion mutation operator.

3.6

Education Step

The education step is used to improve the solutions of all children, including the mutations. The idea is to use neighbourhood operations, and see if the objective value has been decreased after each operation. If the objective value decreases, the modified route will be accepted. This is called iterative improvement. We perform an education step on both the day-route and the evening-route separately in the following ways:

• Day-route sequence after the split will be improved iteratively. • Evening-route will be improved iteratively.

• Day-route sequence will be improved iteratively.

For the first education on the day-route, we use operators only on the customers who will be visited after the split, i.e. the customers which are visited until the s has been reached, will be unaffected by the operations. The reason for only using an education on the last part of the first route is because we do not want to change probabilities in this step, i.e. if we use iterative improvement on the day-route, we will decrease the diversity. This is because we are attempting to find a day-route which is longer than the optimal TSP route but with a better set of probabilities, see Section 1. If the route length of the day-route decreases after an operation on the used customer sequence, the sequence created by the operations will be accepted and used as day-route solution of the chromosome. Any operation done on the day-route part after the split, has no influence on the probabilities. The number of operations done in this step will be denoted as nedu−1.

For the evening-route we use operators on the whole route. A modification in the evening-route will only affect the expected length of the evening-route. Hence, the complete sequence of customers is used to take part of the iterative improvement. The number of iterations of this step will be denoted by nedu−2.

(12)

also stored in this list, where we exclude duplicated values. Then, instead of using the range j ∈ [1, ..., n], we use j ∈ L in Equation 5. The approximation of the expected length of indices in list L will be calcu-lated before the operation and after the operation. If the length is lower after the operation than before, the new sequence of customers is used and the difference between these two lengths will be extracted of the total approximated expected length.

The last step of the education will be an iterative improvement on the whole day-route sequence, for a number of nedu−1 iterations. This step only focuses on the length of the day-route while doing the

iterations, and accepts the sequence every time its length is reduces. When the iterative improvement is done, the objective value will be calculated with the new set of probabilities for the evening route. If the objective value is improved, the ’new’ day-route will be accepted, otherwise, the day-route will remain as it was before this step.

The operators used in all three steps, are the swap-operator, the insert-operator and the 2-opt oper-ator. To explain the operators, we use the day-route example as is given in Figure 1, i.e. the top row. For every operator, two distinct random integers, `1 and `2, needs to be drawn, where 1 ≤ `1< `2< n.

Hence, we use in all the examples the random values `1= 3 and `2= 10.

1. The first operator is the swap-operator, as in Vidal et al. (2012). The two selected customers at index `1 and `2 are swapped from there location in the sequence. Hence, we have that customer

number 9 at index 3 switches to index 10 and customer number 7 at index 10 switches to index 3, as in Figure 6.

Figure 6: The swap-operator, where the customers at index 3 and index 10 are being swapped. Which results in the route sequence as in Figure 7.

Figure 7: The resulting customer sequence after using the swap-operator.

2. The second operator is the insert-operator, as in Vidal et al. (2012). The customer at index `1

will be withdrawn from the sequence. All customers at indices [`1+ 1, ..., `2] will shift to one index

lower, and the customer which was at `1 will be placed at index `2. Using the example, customer

9 at index 3 will we placed at index 10, and all customers with index [4, ..., 10] will be placed at [3, ..., 9] in the same order, as is shown in Figure 8.

Figure 8: The insert-operator, where the customer at index 3 will be placed at index 10 and all customers at indices 4 until 10 will be placed one index lower.

Which results in the route sequence as in Figure 9.

(13)

Figure 9: The resulting customer sequence after using the insert-operator.

2, `2+ 1, `2] will be mirrored such that we insert the following sequence back in to the array

[`2, `2+ 1, `2+ 2, ..., `1+ 2, `1+ 1, `1]. Using the example, we have that customer 9 at index 3 swaps

places with customer 7 at index 10. Customer 1 at index 4 will swap places with customer 10 at index 9, etc. This has been depicted in Figure 10.

Figure 10: Which results in the route sequence as in Figure 11.

Figure 11: The resulting customer sequence after using the 2-opt-operator.

For each of the three cases, each operator has a probability of 1

3 for each iteration.

3.7

Population Management

After the creation of the offspring and the education of the children, the offspring will be added to the former population. The final step of an iteration in the GA, as in Figure 1, is to manage the population. The management of the population is done by selecting a group of chromosomes to form the new population which enters a new iteration, i.e. a group of chromosomes is getting killed. Since we strive for a low objective value, low day-route lengths and low evening-route lengths, we select the chromosomes we want to keep for the next iterations based on these three values. Also, as earlier mentioned, we aim for diversity. Hence, we will also select a group of chromosomes at random which we will use for the next iteration. The selection of the new population is done by selecting four different fractions of the current population

1. A fraction f1 of chromosomes are selected having the lowest objective values is selected.

2. A fraction f2 of chromosomes are selected having the lowest length of the day-route is selected.

3. A fraction f3 of chromosomes are selected having the lowest expected length of the evening-route

is selected.

4. A fraction f4 of chromosomes are selected, which are not in f1, f2or f3, at random.

3.8

Benchmark

(14)

a state-of-the-art heuristic to solve the remaining PTSP, with the probabilities given by the TSP route. This approach neglects the opportunities to adjust the day-route to increase the expected successes on delivery, as was already suggested in Section 2.

The heuristic used for the PTSP is a Genetic Algorithm as used in Liu (2010). The general Genetic Algorithm is presented in Algorithm 1. Liu (2010) uses the following steps:

1. Initialization: Random and two different types of nearest neighbour approaches. 2. Parent Selection: Fitness-proportional, Tournament Selection and Elitism. 3. Crossover: Edge Recombination.

4. Education: Insert and 2-opt, as presented in Section 3.6. 5. Population Management: Elitism.

4

Computational Experiments

To see the effectiveness of the heuristic presented in Section 3, we create a data set, and let the benchmark method and the proposed heuristic run on this data set.

4.1

Instances

The data set consists of a total of 120 instances. The information needed in this data set are the coordi-nates (or the distance matrix) of the customers, the probabilities (morning and afternoon probability of every customer) and the distance at which the morning turns in to the afternoon.

These instances consist of 23 TSPlib1instances. Out of this library all symmetric TSP instances with 2D Euclidean distance coordinates and with less than 150 customers are used. The first two characteristics, symmetry and 2D euclidean distance, are determined in 1. The selection of instances which consist of less than 150 is done due to the complexity of the problem.

Out of every TSPlib instance, 5 instances for this data set are generated. This is done by varying in the probabilities. The 5 different types of instances are generated as follows, let ri,1, ri,2 and ri,3 be three

random generated probabilities, i.e. ri,1, ri,2, ri,3∈ [0, 1] are random values generated for customer i. pi,1

and pi,2 are the morning and afternoon probabilities for customer i. The 5 different instances can be

generated as following

1. pi,1= ri,1and pi,2= ri,2

2. If ri,3≥ 0.7, then pi,1= ri,1 2 and pi,2= ri,2 2 + 1 2

If ri,3< 0.7, then pi,1= ri,1 2 + 1 2 and pi,2= ri,2 2

3. If ri,3≥ 0.7, then pi,1= ri,1 4 and pi,2= ri,2 4 + 3 4

If ri,3< 0.7, then pi,1= ri,1 4 + 3 4 and pi,2= ri,2 4

4. If ri,3≥ 0.7, then pi,1= ri,1 10 and pi,2= ri,2 10 + 9 10

If ri,3< 0.7, then pi,1= ri,1 10 + 9 10 and pi,2= ri,2 10

5. If ri,3≥ 0.7, then pi,1= 0 and pi,2= 1

If ri,3< 0.7, then pi,1= 1 and pi,2= 0

(15)

parameter range best performing value ninit [10, 2000] 500 tmax [100, 1000] 100 mitt [10, 300] 300 nparents [10, 2000] 500 fmut [0, 1] 0.33 nedu−1 [0, 1000] 100 nedu−2 [0, 1000] 150 nedu−3 [0, 1000] 100 f1 [0,1] 0.2 f2 [0,1] 0.2 f3 [0,1] 0.3 f4 [0,1] 0.3

Table 2: The selected parameter values after tuning with given range.

The subsets of instances for each probability is denoted by γi for i = [1, ..., 5], where the probabilities

of each subset i is given above. The different subsets are used to gather information on with which probabilities the heuristic outperforms the benchmark method in terms of lower objective value. To sum up, a total of 115 instances are used, based on 23 instances from the TSPlib, using 5 different types of probabilities.

4.2

Parameter Tuning

To test the mutation and education operators and to tune the parameters, we use 15 self-created in-stances. These instances have 49, 99 or 149 customers spread out on a 100 by 100 grid. The coordinates of the customers are generated randomly. For each number of customers, 5 different instances are created using the probabilities as defined in Section 4.1. We test the parameters iteratively, and will select the values which do significantly give lower objective values. Note, that if the best performing value equals 0 of an operator, the operator will be excluded from the heuristic.

The average objective value of the 15 instances is used to compare each set of parameters. The range used for each parameter and the best performing value are presented in Table 2. The size of the population after each iteration is always returned to ninit. Next to that, we always have nparents≤ ninit, and for the

population reduction, we always must have that P4

i=1fi = 1. Note, that all parameters, except for the

population reduction parameters, influence the running time of the heuristic. We aim to run each instance within 2 hours. If we use all maximum ranges of the parameters as in Table 2, the running increases to approximately 345 hours. Hence, some combinations of parameters are excluded if the running time gets to high. If increasing a parameter does not result in a lower average objective value, we do not use the increased parameter value. The best performing values as given in Table 2 are the parameter values used for generating the numeric results.

4.3

Results

(16)

Instance range Number of % instances having a min % max % mean %

set of n instances lower objective value difference difference difference

compared to the benchmark

All Instances [50, 149] 115 41,47% -24,05 35,81 -0,69 γ1 [50, 149] 23 13,04% -19,36 2,50 -6,45 γ2 [50, 149] 23 21,47% -15,85 5,6 -6,38 γ3 [50, 149] 23 21,47% -24,05 4,47 -8,07 γ4 [50, 149] 23 60,87% -11,75 16,63 2,44 γ5 [50, 149] 23 91,30% -6,5 35,81 15,04 α1 [50, 99] 60 48,33% -20,87 30,82 0,8 α2 [100,150] 55 36,36% -24,05 35,81 -2,3 β1 [50, 75] 25 56% -14,01 26,87 3,15 β2 [98, 106] 40 47,50% -20,25 34,31 0,77 β3 [123, 149] 40 30% -24,05 35,81 -3,39

Table 3: The results of the numerical experiments of the heuristic method compared to the benchmark method, for the complete set and a selection of subsets of the instances.

also for subsets of the instances. At first, the general performance is that for 48 of the 115 instances, the heuristic method did find a lower objective value than the heuristic method. Since the minimum differ-ence is -24,05% and the maximum differdiffer-ence equals 35,81%, we can state that neither of the methods outperforms the other for the whole data set.

The subsets γi are the subsets where for all i = [1, ..., 5] different types of probabilities are used, as

presented in Section 4.1. We can see that the heuristic method performs better when the difference between the two probabilities of each customer gets higher. We can see that for γ4 and γ5the heuristic

method did perform better for more instances than the benchmark, and the average percentage difference is positive. But note that for each γi, instances exist where the heuristic method did find a lower objective

value than the benchmark method. Hence, even for similar probabilities (γ1), there exist solutions with

a lower objective value than the benchmark method.

Finally, we also made subsets based on the number of customers, where αi with i = [1, 2] and βi with

i = [1, 2, 3]. The heuristic method performs better with less customers, and outperforms even more for instances ranging 50 ≤ n ≤ 75. Since we see the results of the heuristic method getting worse compared to the benchmark method when the n increases, we can state that the heuristic method is more sensitive to complexity. Which was already pointed out in Section 1.

The idea of the model was to increase the route length of the day-route to get a better set of prob-abilities such that the expected length of the evening-route decreases. To outperform the benchmark method, the decrease of the expected evening-route length has to be larger than the increase of the day-route. For every instance where the heuristic method did obtain a lower objective value than the benchmark method, this was the case. The average increase of the day-route, compared to the optimal TSP route of the benchmark method, is 12,04 %.

5

Conclusion and further research

(17)

all customers need to be visited which were not at home during their visit, a PTSP route. A deviation from the shortest day-route can lead to a higher delivery success, which decreases the expected evening-route. The high complexity of the problem, for diversity in the day-route, and for a short as possible evening-route, a Genetic Algorithm is a heuristic framework which can be used to solve this problem. Using a benchmark, where first the TSP route is solved, and given those probabilities the PTSP route, we found that the proposed heuristic algorithm indeed gives significant smaller PTSP routes. In total, the heuristic method did obtain a lower objective value for 48 out of the 115 instances compared to the benchmark method. In the most extreme case, the heuristic method obtained an objective value which was 35% lower than the objective value of the benchmark method. As such, this result satisfies the idea that increasing the day-route length to get a better set of probabilities so that the expected evening-route length decreases is a possibility to get a lower objective value. The heuristic method outperformed the benchmark method for more instances for the subsets where the difference in probability for each cus-tomer was higher. Also, the heuristic method performed better with less cuscus-tomers.

The opportunities for further research are to look at cases with more than 2 probabilities for each customer, for example a different probability for every hour of the day. Also, a study could be conducted where, instead of using an evening-route, all customers who are not at home during their delivery will be added to the route which the deliverer will drive the next day. And, of course, the principle of adding probabilities of customers being at home at given times could be used as an extension on any of the research topics which expanded on the TSP.

References

Applegate, D. L., R. E. Bixby, V. Chvtal, and W. J. Cook (2006). The Traveling Salesman Problem, A Computational Study. Princeton University Press.

Bianchi, L., M. Dorigo, and L. M. Gambardella (2003). New Approaches for Solving the Probabilistic Traveling Salesman Problem. Universit Libre de Bruxelles, Facult de Sciences Appliques.

Erdogan, G., G. Laporte, and D. Vigo (2010). The traveling salesman problem with pickups, deliveries, and handling costs. Transportation Science 44, 383–399.

Ho, George T. S., Ping Ji, and Henry C. W. Lau (2008). A hybrid genetic algorithm for the multi-depot vehicle routing problem. Engineering Applications of Artificial Intelligence 21, 548–557.

Holland, John H. (1975). Adaptation in natural and artifical systems: An introductory analysis with applications to biology, control and artificial intelligence. University of Michigan Press.

Jaillet, P. (1985). Probabilistic travelling salesman problems. Ph. D. thesis, MIT, Cambridge.

Larraaga, P., C.M.H. Kuijpers, R.H. Murga, I. Inza, and S. Dizdarevic (1999). Genetic algorithms for the travelling salesman problem: A review of representations and operaters. Artificial Intelligence Review 13, 129–170.

Liu, Y. (2007). A hybrid scatter search for the probabilistic traveling salesman problem. Computers & Operations Research 34, 2949–2963.

Liu, Y. (2010). Different initial solution generators in genetic algorithms for the probabilistic traveling salesman problem. Applied Mathematics and Computation 216, 125–137.

(18)

Ropke, S. (2007). A general heuristic for vehicle routing problems. Computers & Operations Research 34, 2403–2435.

Vidal, T., T. C. Crainic, M. Gendreau, N. Lahrichi, and W. Rei (2012). A hybrid genetic algorithm for multidepot and periodic vehicle routing problems. Operations Research 60, 611–624.

Referenties

GERELATEERDE DOCUMENTEN

ernstig letsel, uitgedrukt in aantal bromfiets-auto-ongevallen per miljard voertuigkilometer over de periode 1985-2004. De expositie is bepaald door het product van het totale

k aart van De Gemeente a sseBroek uit 1815 (raB f onDs k. Alle grote hoeven of sites zijn zonder walgracht aangeduid op de kaart. Het Sint-Trudoleken is deels de grens

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

The questions we seek to answer include; if the model is fitted to the data available, can we estimate the number of drug users in a given community based on the fit (which will be

Mogelijk heeft dat opbrengstderving als gevolg (geschatte kosten €50 en €85 per ha in respectievelijk scenario A en B). Door het beperken van de inzet van champost of

the intensification phase, the algorithm tries to im- prove the current solution by using a local search procedure (adjacent pairwise exchange) in combina- tion with tabu search..

The first respective sub question seeks to explore the perceptions of safety of female migrants and refugees, including asylum seekers, in Cape Town, South Africa, by answering

In this thesis I will prove which groups split all short exact sequences for the arbitrary caseC. If I define a short exact sequence, I will always mean a short exact sequence