• No results found

An extension of the location-routing problem including customer pick-up

N/A
N/A
Protected

Academic year: 2021

Share "An extension of the location-routing problem including customer pick-up"

Copied!
23
0
0

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

Hele tekst

(1)

An extension of the location-routing problem including

customer pick-up

Frederik Tijhuis

Faculty of Economics and Business, University of Groningen, m.f.tijhuis@student.rug.nl, s2026457 Supervisors: Dr. Stuart Zhu and Dr. Stefano Fazi

July 2015

Abstract

This thesis proposes a generalization of the capacitated location-routing problem, where the assumption that only a supplier can travel does not hold. In the proposed model the customer can also pick up the product him-/herself. A mixed integer programming model is developed to select which pick-up points to open, which customers to assign to pick-up or delivery, and to determine the optimal delivery routes. The mixed integer programming model is solved directly using a commercial solver. However, only small instances can be solved within reasonable time. Thus, the proposed solution method is a heuristic algorithm. The heuristic consists of an intensification phase, using adjacent pairwise exchange to optimize the routes, and a diversification phase, to escape local maxima. Both phases use a tabu search mechanism to prevent cycling. The proposed heuristic provides good solutions within a reasonable time.

Keywords: location-routing problem, pick-up, tabu search, metaheuristic

1

Introduction

The idea behind this thesis originates from a medicine distributor called Alliance Healthcare (AH). Due to changing market conditions in the pharmaceutical industry, AH is looking for ways to improve its

distribution system. AH currently distributes its

medicines via pharmacies, i.e. patients pick up their medicines at the pharmacy or the pharmacy

deliv-ers the medicines to patients. However, the

com-pany is considering a new distribution service. The new service is aimed at reducing distribution costs and increasing customer service. AH highly values their customer relations. Therefore, service is one of their main objectives. AH is considering distribution via medicine lockers. A medicine locker is a place

where AH delivers medicines and puts them in secure boxes. And where patients can go to pick up their medicines. The advantages of a locker are that the patients will never have to wait and they can pick up the medicines at their own convenience. Besides that, the pharmacy can save costs because it can reduce its opening hours. Moreover, since fewer patients will be served in the pharmacy, there is more time available per patient in the pharmacy. The problem of AH consists of two parts: determining the optimal loca-tion of the lockers and determining optimal routes from the pharmacy. An extensive literature review is conducted in order to investigate how this type of problem, i.e. considering location and routing simul-taneously, is solved in the literature.

(2)

loca-tion and vehicle routing choices are crucial. Many companies handle those choices separately. However, research has shown handling those choices separately often leads to suboptimal solutions (Salhi and Rand,

1989). The location-routing problem (LRP)

over-comes this problem by integrating location and rout-ing decisions. In the LRP we are given a set of po-tential facility locations and a set of customers. The problem is to choose a subset of facilities to operate and to construct vehicle routes from those facilities to the customers. Every customer has to be visited exactly once by a vehicle. And the vehicle and fa-cility capacities have to be respected. The goal is to minimize the total costs (fixed facility costs and routing costs). The LRP originates from the vehicle routing problem (VRP), which is a generalization of the travelling salesman problem (TSP) (Flood, 1956). The VRP was originally proposed by Dantzig and

Ramser (1959). Since then, many different

exten-sions and formulations have been proposed. For a complete review of the various VRP variations inter-ested readers are referred to the books of Toth and Vigo (2002) and Cordeau et al. (2006) and the survey papers of Laporte (2007, 2009). In VRP, only rout-ing decisions are considered. But later on, authors started to consider both location and routing simul-taneously. Laporte (1988) describes different formu-lations of the LRP which are published up to 1988. Nagy and Salhi (2007) provide an extensive review of LRP literature and summarize different formulations of the LRP which are published since the review of Laporte (1988).

Solution approaches for the LRP can roughly be divided into heuristics and exact algorithms, with most of the literature devoted to the first category. A review of exact algorithms is given by Laporte and Nobert (1987). A more elaborate discussion of exact algorithms for the LRP is provided in Laporte (1989). Recent exact methods for the LRP are provided by Baldacci et al. (2011), Belenguer et al. (2011), and Contardo et al. (2013). Since the LRP is NP-hard, only small instances can be solved by exact meth-ods. Therefore, LRP cases are often solved by us-ing heuristics. More elaborate information on LRP heuristics can be found in Gendreau et al. (2001), Cordeau and Laporte (2005), and Cordeau et al.

(2005). Recent heuristics for the LRP are provided by Prins et al. (2006, 2007), who propose a greedy randomized adaptive search procedure (GRASP) and a cooperative langrangean relaxation-granular tabu search heauristic (LRGTS). The latter is, on aver-age, the most effective metaheuristic on benchmark instances from the literature.

In all the articles discussed above, only the dis-tributor is able to travel. However in many practical applications it might be very inefficient to let the dis-tributor travel to every customer. Instead it might be beneficial to allow the customer to pick up the prod-uct at a pick-up point. Or, in the case of AH, at a medicine locker. Therefore, in this paper I propose a generalization of the LRP including the pick-up op-tion. In this problem the demand of the customer could be satisfied either by delivery from the supplier or by customer pick-up. To the best of my knowledge this problem has not been addressed in the literature. One of the practical applications of this problem is in the pharmaceutical distribution industry, as dis-cussed before. Instead of delivering medicines from the pharmacy to every patient, it is possible to place medicine lockers in strategic locations to allow pa-tients to pick up their own medicines. Besides that, other practical applications are possible. The model could easily be adapted for ATM location or for par-cel delivery.

The proposed problem is NP-hard as it is a gener-alization of the LRP. Because of this, using an exact solution approach is inconceivable for large-scale in-stances. Therefore, the proposed solution method is

a heuristic algorithm. The heuristic starts from a

feasible solution, which is constructed using a simple nearest neighbor algorithm. Then, it alternates be-tween an intensification and a diversification phase. In the intensification phase, the vehicle routes are im-proved by using adjacent pairwise exchange. In the diversification phase the algorithm moves to a dif-ferent section of the solution space by changing the length of the route. Both phases use a tabu search mechanism to escape local maxima and to prevent cycling.

(3)

A new heuristic algorithm to solve this problem is proposed. (3) Computational results are provided to indicate the effectiveness of the proposed heuristic al-gorithm. Moreover, these computational results can function as a benchmark for future research into the LRP including pick-up.

The paper is organized as follows. Section 2 gives the formal description of the problem and provides a mixed integer linear programming formulation. De-tails of the proposed solution method are described in section 3. In section 4, the performance of the proposed solution is evaluated and computational re-sults are presented. And finally, some conclusions are provided in section 5.

2

Problem

Definition

and

Mathematical Model

The LRP model proposed here is an extension of the integer linear problem developed by Prins et al. (2007). The model uses an undirected graph G = (V, E, C). Where V is a set of nodes comprised of a subset I of m possible pick-up point locations, a subset J of n customers, and a subset P of o depots. E is a set of edges (i, j). C contains the costs. Each edge (i, j) has an associated travel cost cij. These

costs can differ between customer pick-up and deliv-ery from the depot. This leads to: pick-up costs (cpij) and delivery costs (cd

ij). Moreover, all pick-up points

i ∈ I have a capacity of Wi and a fixed opening cost

of Oi. Besides that, every customer j ∈ J has a

de-mand of dj. And finally, every vehicle k ∈ K has a

fixed capacity of Q and a fixed operating cost F . The model is based on the assumption that the pick-up points are replenished by the supplier of the distributor. So basically, it is assumed that the pick-up points are always filled. Besides that, the follow-ing constraints must hold:

- Each demand dj must be served exactly once by

only one distribution service, pick-up or delivery. - Each delivery route must begin and end at the de-pot, and its total demand must not exceed vehicle capacity.

- The total demand of customers assigned to a

pick-up point must not exceed the capacity of that pick-pick-up point.

- Customers can only be assigned to opened pick-up points, and they can only be assigned to receive deliv-ery from the depot if a route linking them is opened. The model uses the following binary decision vari-ables: yi= 1 if pick-up point i ∈ I is opened, xijk = 1

if edge (i, j) is traversed from i to j in the route

per-formed by vehicle k ∈ K, zij = 1 if customer j is

assigned to pick up at facility i ∈ I ∪ P , and fij= 1

if customer j is assigned to receive delivery from de-pot i ∈ P .

(4)

xijk∈ {0, 1} ∀i ∈ V, ∀j ∈ J, ∀k ∈ K (10)

yi∈ {0, 1} ∀i ∈ I (11)

fij∈ {0, 1} ∀i ∈ P, ∀j ∈ V (12)

zij∈ {0, 1} ∀i ∈ I, ∀j ∈ J (13)

The objective function (1) consists of the fixed costs of the vehicles used, the variable costs of the vehicle deliveries, the fixed costs of operating the pick-up points, and the variable costs of serving cus-tomers at the pick-up point. Constraints (2) ensure that only one distribution mode is selected per cus-tomer: delivery from the depot or customer pick-up. Constraints (3) ensure that, when delivery from the depot is selected, every customer belongs to one and only one route and that every customer has only one predecessor in the tour. Constraints (4) guarantee that customers are only assigned to opened pick-up points and that the total demand of all customers as-signed to a pick-up point does not exceed the capac-ity of that pick-up point. Constraints (5) are capaccapac-ity constraints. They ensure that the total demand in a certain route does not exceed the capacity of the vehi-cle performing that route. Constraints (6) ensure the continuity of each route. Whenever a vehicle goes to a certain customer, it also has to leave. And when there is no vehicle going to a customer, there can also be no vehicle leaving that customer. Constraints (7) ensure that every vehicle performs at most one route. Con-straints (6) and (7) combined ensure the continuity of each route and a return to the depot. Constraints (8) are sub tour elimination constraints. They spec-ify that a tour which includes customers only is not allowed. This means that a tour will always have to include the depot. Constraints (9) ensure that a cus-tomer can receive deliveries from the depot only if a route linking them is opened. Constraints (10-13) are binary constraints.

3

Solution Method

Since the proposed model is a generalization of the LRP, which is NP-hard, the proposed model is also

NP-hard. Therefore, only very small cases of the

model can be solved in reasonable time by exact

methods, as shown in Section 4. Thus, in order

to solve cases of a more realistic size, a heuristic is

needed. In this section a two-phase metaheuristic

is proposed. The metaheuristic combines elements of local search (adjacent pairwise exchange), greedy search (nearest neighbor algorithm), and tabu search. Before the metaheuristic begins, an initial solution is generated. This is done by allocating all customers

to either pick-up or delivery. The customers

allo-cated to delivery are combined into a route by us-ing the nearest neighbor algorithm (NNA). Then, the metaheuristic alternates between two phases: an

in-tensification phase and a diversification phase. In

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. Tabu search is a metaheuris-tic which performs the best available move in a given neighborhood, even when that move is non-improving (Glover and Laguna, 1997). This enables the search to escape from local optima. A tabu list (i.e. a list of recent moves) is included in order to prevent cy-cling. Besides intensification, diversification is also needed. In the second phase, the algorithm uses a switching mechanism to diversify the search space. One customer is switched from delivery to pick-up or vice versa. In the following sections, the details for each phase are provided.

3.1

Initial Solution

The algorithm used to create the initial solution con-sists of two stages. First, there is an allocation stage where customers are either allocated to pick-up or to receive delivery. Second, there is a routing stage where the customers allocated to receive delivery are combined into a feasible route. The detailed descrip-tion of the two stages is as follows.

(5)

esti-mate of pick-up and delivery costs for each customer. As a proxy for pick-up cost, the cost of allocating him/her to the closest pick-up point is used. This cost is estimated by using Cijp + Oi/Wi. Where Cijp

is the customer specific pick-up cost when he/she is allocated to the nearest pick-up point. And Oi/Wiis

his/her share of the fixed cost of the pick-up point. As a proxy for delivery cost, the average distance of all edges is used. I.e. the average value of the Cd

ij

matrix. So, the estimate for delivery cost is the same for every customer. The underlying idea is that on average there will always be a customer in the neigh-borhood with that distance. So, receiving delivery via routing will, on average, cost that amount. Then, ev-ery customer allocated to pick-up is allocated to the pick-up point closest to him/her. If there is no re-maining capacity available at that pick-up point, the customer is allocated to delivery.

Routing: All customers allocated to receive deliv-ery are combined into a route by using a simple near-est neighbor algorithm (NNA). The algorithm starts at the depot and finds the closest customer. Then, it finds the next customer closest to the current cus-tomer, and so on. And finally, from the last customer the route is connected to the depot.

The framework for generating the initial solution is shown in Algorithm 2.

3.2

Intensification: Adjacent Pairwise

Exchange and Tabu Search

In this phase, the constructed route is improved by adjacent using pairwise exchange. This means that every adjacent pair in a route is swapped. E.g., for the route [1 2 3], the adjacent pairwise exchange would analyze the routes [2 1 3] and [1 3 2]. Then, the best non-tabu route is selected, and the tabu list is updated (see Algorithm 4). This approach only an-alyzes a very limited neighborhood. It analyses λ − 1 new routes, where λ represents the number of cus-tomer belonging to the route. In order to broaden the search space, multiple iterations of the pairwise

exchange algorithm are performed. After each

it-eration, the current route is updated by moving to the best route in the neighborhood. The tabu list prevents the algorithm from returning to a

previ-ously analysed route (see Algorithm 3). This enables the pairwise exchange algorithm to analyse way more than λ − 1 possible routes. For the previous example of route [1 2 3], say that after the first iteration route [1 3 2] turns out to be the best neighbor. In the sec-ond iteration, the algorithm starts with route [1 3 2] and analyzes [1 2 3] and [3 1 2]. Since route [1 2 3] is tabu, it will move to route [3 1 2]. This route could never have been reached by only one iteration of the pairwise exchange algorithm. After a given number of iterations, the algorithm stops and returns the best route in the neighborhood of the original route.

3.3

Diversification: Switching

Mecha-nism and Tabu Search

This last phase is a diversification phase. Here one customer is switched from pick-up to delivery or vice versa. This phase is rather essential, because if it were omitted only a very limited part of the solution space would be investigated. Without this switching mechanism the allocation of customers to pick-up and delivery would always remain the same and only the routing would be improved.

In this phase, the optimal customer to switch is se-lected based on the total cost savings resulting from that switch. To calculate the cost savings, customers allocated to pick-up and delivery are analysed sepa-rately. First, all customers allocated to pick-up are

analysed. To calculate the savings resulting from

switching a customer from pick-up to delivery, the cost savings resulting from not using a pick-up point anymore (i.e. pick-up costs) are compared to the in-creased cost of delivery (i.e. insertion cost). A cus-tomers current pick-up cost is estimated by calculat-ing his/her pick-up cost (CP

ij) plus his/her share of

the fixed cost of the pick-up point (Oi/W i). Then, the insertion cost of that customer (i) between two consecutive customers j and l in the route is com-puted as follows: Cins = Cji+ Cil − Cjl. This is

(6)

Second, all customers (i) allocated to receive deliv-ery are analysed. To calculate the savings resulting from switching a customer from delivery to pick-up, the costs savings due to the shorter route are com-pared to the increased pick-up costs. First, the cost savings are calculated by deleting that customer from

the route. Second, the pick-up cost of allocating

him/her to the nearest available pick-up point is es-timated. If no pick-up point is available, the pick-up

cost becomes infinite. This ensures that this

cus-tomer will never be selected for switching. Finally, the cost saving from switching this customer is cal-culated by savings - pick-up cost. If the cost saving is greater than any value found before and customer i is not tabu, i becomes the optimal customer to switch. And the current cost saving becomes the optimal sav-ing. After all customers are analysed, the tabu list is updated by adding i and deleting the last element. Finally, the algorithm returns the optimal customer to switch and the corresponding post switch route or post switch allocation. The framework of the switch customer algorithm is given in Algorithm 5.

3.4

The Complete Metaheuristic

The three procedures explained above, initial setup, pairwise exchange, and the switching mechanism

combined create the complete metaheuristic. The

framework of this metaheuristic is shown in Algo-rithm 1. First, the initial solution is generated as input for the algorithm. The algorithm performs a fixed number of iterations. In each iteration, first the routing is improved by the pairwise exchange algo-rithm. After the algorithm has moved to the best route in the neighborhood, the objective value of the solution is calculated. If it is lower than the opti-mal value, the current solution becomes the optiopti-mal solution. And its corresponding value becomes the optimal value. After that, the algorithm performs a diversification phase. It finds the optimal customer to switch and switches that customer. And again, it checks whether the current solution is better than any solution found before. If that is the case, the current solution becomes the optimal solution and its corresponding value becomes the optimal value. Finally, after the iteration ends, the number of

itera-Algorithm 1: The Complete Metaheuristic Input: m, n, o, Wi, Oi, dj, F, Q,

stoppingcriterion, maxlengthtabulistswitch, maxlengthtabulist, maxiterations-two-opt

// Input the initial solution (see Algorithm 2)

while number-of-iterations < stoppingcriterion do

// Intensification phase: 2-opt /

pairwise exchange

if route contains more than 1 customer then Find the best route in the neighborhood by using the Two Opt Algorithm (see Algorithm 3);

Move to the best route in the

neighborhood and update the relevant variables (xijk, route);

Calculate objective-value;

if objective-value < optimal-value then optimal-value = objective-value; optimal-solution = current solution; end

end

// Diversification phase: switch

customer

Find the optimal customer to switch by using the Switch Customer Algorithm (see Algorithm 5);

Switch the customer and update all relevant variables (xijk, zij, route, pickup);

Calculate objective-value;

if objective-value < optimal-value then optimal-value = objective-value; optimal-solution = current solution; end

number-of-iterations = number-of-iterations + 1;

end

return optimal-value, optimal-solution

(7)

algorithm terminates and returns the optimal solu-tion.

4

Computational Results

Extensive computational test are performed in order to test the performance of the proposed metaheuris-tic. Section 4.1 describes the generation of input data and parameter setting. Section 4.2 discusses the per-formance of the metaheuristic. In this section, the metaheuristic solutions are compared to exact solu-tions obtained by a commercial solver. Section 4.3 tries to further improve the heuristic by testing the performance of different searching algorithms. Sec-tion 4.4 provides a discussion of the findings. The code has been implemented in Matlab and is tested on an Acer Aspire XC600 PC, with a 64 bits proces-sor 3.00 GHz Intel 5, 4 GB of RAM, and Windows 8.1. The integer linear programming solver (intlin-prog) from Matlab was used to solve the exact models based on the formulation presented in Section 2.

4.1

Generation of Input Data and

Pa-rameter Setting

Every problem instance is characterized by several elements: the number of customers (n), the number of pick-up points (m), the number of depots (o), the delivery cost matrix (CijD), the pick-up cost matrix (CijP), The capacity of the pick-up point (W i), the opening cost of the pick-up point (Oi), customer de-mand (dj), the number of vehicles (k), vehicle capac-ity (Q), and finally, a fixed vehicle cost (F ). For every instance, the coordinates of the vertices are randomly generated. The coordinates are uniformly distributed integer values between [0,100]. Distance between ver-tices is measured as the Euclidean distance. So, CD ij

and CP

ij represent Euclidean distance matrices. All

other parameters have to be entered manually into the model. For this thesis, the values shown in Ta-ble 1 are used. Every instance is assumed to have only one depot (i.e. o = 1), and one vehicle (i.e. k = 1). This could be extended, but that goes be-yond the scope of this thesis. The goal of this thesis is to provide a good initial heuristic, which can be

Table 1: Parameters Model Parameters n depends on instance m depends on instance o 1 Cijp random Cd ij random Wi 3 Oi 20 dj 1 k 1 Q inf F 0 Heuristic Parameters stoppingcriterion 2n maxlengthtabulistswitch {5,10} maxlengthtabulist {1,5,10} maxiterations-two-opt {5,10}

(8)

Table 2: Comparison between exact solution and heuristic

Solver Heuristic Gap

n m Time Time worst best average

3 2 0.14 0.02 20.43 % 0.00 % 3.57 % 4 2 0.20 0.03 5.44 % 0.00 % 0.83 % 5 2 0.30 0.05 18.68 % 0.00 % 4.80 % 5 3 0.24 0.06 18.23 % 0.00 % 2.61 % 6 3 0.38 0.09 11.16 % 0.00 % 5.45 % 7 3 0.67 0.08 14.54 % 0.00 % 4.88 % 8 3 1.18 0.12 10.60 % 0.00 % 2.97 % 9 3 2.84 0.14 8.26 % 0.00 % 2.53 % 10 5 6.43 0.21 5.70 % 0.00 % 3.09 % 11 5 15.50 0.25 8.25 % 0.00 % 2.72 % 12 5 37.49 0.32 16.85 % 0.00 % 4.37 % 13 5 89.28 0.37 15.49 % 0.00 % 1.83 % 14 5 253.23 0.38 5.63 % 0.00 % 2.32 % 15 5 471.96 0.42 3.01 % 0.39 % 1.58 % 18 5 8696.50 0.85 n.a. n.a. 2.12 % 18 10 12517.62 0.87 n.a. n.a. 0.00 %

to prevent cycling. But at the same time, they should not be too long, which will restrict the search space. After some experimenting it turns out that a value of 5 works well for smaller cases (n ≤ 20), and a value of 10 works good for bigger cases (n > 20). And finally, it must be noted that the tabu list used in the pair-wise exchange algorithm does not work well in very small cases. When very few customers are allocated to a route, it often happens that all neighbors be-come tabu and the algorithm terminates. In order to prevent this, the length of the tabu list is set to one for very small cases (n ≤ 5). All these parameters are shown in Table 1.

4.2

Comparison with Exact Method:

Performance Testing

In this section the metaheuristic is compared to the proposed exact formulation. In total 135 randomly generated instances are tested. The results are

sum-marized in Table 2. The first two columns

repre-sent the number of customers (n) and the number of pick-up points (m) respectively. The third and fourth column show the time it took the commercial solver

(9)

Table 3: Description of Alternative Heuristics

Phase 1 Phase 2

Heuristic Intensification: Adjacent Pairwise Exchange Diversification: Switch Patient Algorithm

Heuristic V2 Reconstruction: Nearest Neighbor Algorithm Diversification: Switch Patient Algorithm

Heuristic V3 Intensification: Adjacent Pairwise Exchange Diversification & Reconstruction: Switch

Pa-tient Algorithm & NNA

Heuristic V4 Intensification: 2-Opt Algorithm (incl.

ran-domness)

Diversification: Switch Patient Algorithm

in the next section. Besides a good performance in terms of quality, the heuristic is also quite fast. It needs very little time compared to the commercial solver. Overall, it can be concluded that the heuris-tic provides feasible solutions of good quality within a reasonable time.

However, this conclusions is only valid for instances

with up to 18 customers. It remains uncertain

whether the heuristic also performs well on larger instances. There are no published benchmarks for the problem proposed here. Besides that, it takes too long to solve larger cases with the commercial solver. Moreover, LP or sub tour elimination con-straint relaxations are also unsuitable as benchmarks. The gaps provided by those relaxations are some-times very large and there is a lot of variety. So, they cannot serve as a basis for solid conclusions. In order to be able to perform benchmarking on larger instances, different searching algorithms are tested in the next section. It must be noted that the conclu-sions will only indicate the relative performance of the different heuristics.

4.3

Testing Alternative Searching

Al-gorithms

In this section, alternative searching algorithms are tested. This is done to see if the individual phases (intensification and diversification) of the proposed metaheuristic could potentially be improved. In both phases different searching algorithms are used and performance comparison is conducted. In total three variations of the original heuristic are created. Table

3 provides a description of those variations, which will be discussed more elaborately below.

4.3.1 Heuristic V2: Reconstruction instead

of Intensification

In the intensification phase, the adjacent pairwise exchange algorithm is replaced by a simple nearest neighbor algorithm (NNA). This is done because pre-liminary testing shows that the adjacent pairwise ex-change combined with NNA does not lead to much better results than NNA alone. Due to the way the heuristic is designed, the intensification phase basi-cally solves a TSP. Therefore, the performance of

this phase can be tested on TSP instances.

Sev-eral instances from the well-known data set TSPLIB (Reinelt, 1991) are used. The TSPLIB is a collection of many TSP instances discussed by various authors (Reinelt, 1992; Krolak et al., 1971; Padberg and Ri-naldi, 1991). The instances are presented in Table 20. The first column indicates the name of the instance. For a more elaborate description of the instances, please refer to Reinelt (1991). The second column indicates the size of the instance, i.e. the number of nodes. The third column shows the proven opti-mal solution, which is given in the TSPLIB database. The other columns indicate the value found by the algorithm and the gap with the optimum for the re-spective algorithms.

(10)
(11)

value. So, perhaps the performance of the heuris-tic can be improved by only using the NNA. This could lead to solutions of similar quality in a signifi-cantly shorter time. However, those preliminary test were conducted on a stand-alone basis (i.e. TSP in-stances) and not as part of the whole metaheuristic. So, Heuristic V2 is included to investigate how the performance of the whole metaheuristic will change when the adjacent pairwise exchange algorithm is re-placed by a NNA. The results are discussed in Para-graph 4.4.

4.3.2 Heuristic V3: Intensification,

Diversi-fication and Reconstruction

In the diversification phase, NNA is added to the switch patient algorithm. This is done to further di-versify the search. However, the NNA is not used in every iteration but only after a given number of itera-tions. If it were used in every iteration, it would work against the idea of the metaheuristic. The idea be-hind the metaheuristic is that it iteratively improves the solution. But when the NNA is used, the algo-rithm starts with a completely new solution. On the other hand, when only the switch patient algorithm is included, diversification is rather gradual (i.e. one patient at a time). The NNA causes a much more drastic diversification. So, Heuristic V3 is included to investigate the trade-off between more diversifica-tion at the expense of lost informadiversifica-tion (because NNA disregards information from previous iterations).

As can be seen in Table 4 Heuristic V3 works better than the original heuristic. So, including extra diver-sification does really add value. But only in the larger cases (n ≥ 50). Moreover, the performance depends very much on the reconstruction interval. The recon-struction interval represents the number of iterations after which the NNA is used. The values presented in the interval column represent the best reconstruc-tion interval. N.a. means not applicable. In those cases the reconstruction could not improve the solu-tion, and the reconstruction interval is set to some

value greater than the number of iterations. This

means that reconstruction will not occur. For some cases Heuristic V3 outperforms the original heuristic. However, the performance is very dependent on the

reconstruction interval. When a different interval is used, the performance of Heuristic V3 is sometimes worse than the performance of the original heuristic. So, extra diversification can potentially improve the proposed metaheuristic. However, it is hard to deter-mine the correct interval beforehand. Future research on the LRP including pick-up could aim at improving the heuristic by properly including diversification.

4.3.3 Heuristic V4: The Effect of

Random-ness

Overall, the proposed heuristic often finds the opti-mal solutions. However, the proposed heuristic has one major drawback: it is deterministic. In other words, there is no randomness. So, it will always find the same solution. If that solution is the optimum, there is no problem. But if that solution is not opti-mal, it is impossible to find a better solution. Chang-ing the parameters (i.e. doChang-ing more iterations) does not have any effect after a certain point. So, find-ing a good solution becomes a matter of luck. This also explains some of the larger gaps in Table 2. In order to overcome this, randomness is added to the heuristic.

Another reason to add randomness to the heuristic is because preliminary tests show that it leads to sig-nificantly better solutions. To test the effect of ran-domness, the adjacent pairwise exchange algorithm is compared with a stochastic 2-opt algorithm. The average gap on a set of TSP instances is reduced from 19.56% to 6.98%. These results are shown in Table 20 in the Appendix. Thus, heuristic V4 is added to test the effect of randomness. A description of how this is done is provided in the Appendix (Algorithm 6). Be-cause this algorithm includes stochasticity, ten runs were conducted for every instance. Table 4 shows the worst, best, and average value found.

(12)

4.4

Discussion

As can be seen in Table 4 Heuristic V2 does not add any value. Almost always it leads to worse solutions than the original heuristic. That could be accept-able if the difference is not very large and Heuristic V2 is much faster than the original heursitic. How-ever, that is not the case. The differences are quite significant and Heuristic V2 is only slightly faster.

The extra diversification of Heuristic V3 does add value. Heuristic V3 always finds values that are at least as good as those found by the original heuris-tic. And often it finds better values, especially for larger instances. This can be seen in the gap column, which shows the gap compared to the original heuris-tic. Heuristic V3 has a gap which is always less than or equal to zero.

And finally, the additional randomness of Heuristic V4 does also add value. Heuristic V4 finds the best solution in most cases. It was able to find the best value for 17 instances. As opposed to 15 and 12 for Heuristic V2 and the original heuristic respectively. Moreover, Heuristic V4 often significantly improves the solution (i.e. is has the biggest gaps). However, there are two instances where Heuristic V4 performs worse than the original heuristic: n = 50, m = 5 and n = 100, m = 50. Especially the latter is remarkable. A potential explanation for this is that a different part of the solutions space is explored. This can be caused by the way the heuristic is designed. The orig-inal heuristic and Heuristic V3 might find different routes in the intensification phase than Heuristic V4. This causes the switch patient algorithm to switch a different patient. From there on, the heuristics ex-plore different parts of the solution space. So, per-haps a suboptimal route in the intensification phase forces the first two heuristics to explore a better part of the solution space. So basically, it is possible that the original heuristic and Heuristic V3 got lucky.

Another remarkable finding is that all four heuris-tics find the same values for the smaller cases. And also Heuristic V4 finds the exact same value in ten different runs. A logical explanation for this is that all heuristics find the same routes in the intensifi-cation phases. Which are likely to be the optimal routes, since they all find the same routes. If that is

true, then in the diversification phase all heuristics will move into the same part of the solution space. The reason for this is that there is no randomness included in the diversification phase. Including ran-domness in diversification is an interesting topic for future research. Heuristic V4 shows that adding ran-domness in the intensification phase leads to better solutions. So, perhaps adding randomness in the di-versification phase also leads to better solutions.

Besides finding the same routes, it is also possible that no customers are assigned to a route. In that case, all heuristics do nothing in the first phase. If there are no customers assigned to a route, there are no routes to improve. So, all heuristics will find the same values in such cases.

The results presented in this thesis can serve as a basis for future research on the LRP including

pick-up. The benchmarking performed in this section

shows that additional diversification and randomness leads to better results. So, these findings can be used in future research to improve the proposed

meta-heuristic. Besides that, the heuristic should solve

more general cases (i.e. multiple depots and

mul-tiple vehicles). Due to the scope of this thesis, a less general heuristic is proposed. It only solves specific cases (i.e. one depot and one vehicle). So, basically, the metaheuristic proposed in this thesis solves a TSP including pick-up. Future research should generalize the heuristic to solve a LRP including pick-up, as presented in Section 2.

5

Conclusion

(13)

part of the solution space. Both phases use a tabu

search mechanism to prevent cycling. The results

of computational tests on a set of randomly gener-ated instances are promising. The proposed heuristic algorithm is able to find solutions that are, on aver-age, within 5.5% of the optimum. Moreover, in many cases the optimum solution is found.

However, the generalizability of the results is lim-ited to small cases. Only small cases of the model can be solved to optimality and serve as a benchmark for the heuristic. Since the problem is brand new, there are no published benchmark instances. So, for larger instances nothing can be concluded about the abso-lute performance of the heuristic. However, extensive computational tests are performed to show the rela-tive performance of the heuristic. Another limitation is that when implementing the heuristic, only one de-pot and one vehicle were assumed. Thus, it remains uncertain whether the heuristic also performs well for more general cases.

Future research into the LRP including pick-up should provide a proper benchmark for the heuris-tic proposed here. One way to do this is by finding the LP relaxation of larger cases. The heuristic so-lution can than be compared to the LP relaxation. However, the gaps between the LP relaxations and the optimum solutions for smaller cases vary a lot. If this is also the case for larger cases, they might not be a suitable benchmark. Moreover, it is hard to obtain the LP relaxations because of the way the sub tour

elimination constraints are formulated. Currently,

a constraint has to be generated for every possible sub tour. This makes the problem incredibly large. Therefore, future research could enhance the math-ematical formulation by making the sub tour elim-ination constraints less general. And besides that, the proposed heuristic could be enhanced in future research. The searching algorithms used in the dif-ferent phases could be substituted with difdif-ferent algo-rithms. For example, the adjacent pairwise exchange algorithm could be replaced by a 3-opt algorithm, simulated annealing, genetic algorithm, etc. A first attempt at improving the heuristic has been provided in Section 4.3. However, this could be done more ex-tensively in future research.

Acknowledgements

The process of writing this thesis was sometimes very challenging, but also very rewarding. I have learned many new skills. A few months ago I had no experi-ence with mathematical modelling, heuristic develop-ment and programming. And now I have developed my own mathematical model and heuristic.

Moreover, I have learned two new programming

languages: Matlab and LATEX. And most

impor-tantly, this thesis helped me to discover a new pas-sion: I discovered that I really like programming. Therefore, I would like to thank my thesis supervi-sors, dr. Stuart Zhu and dr. Stefano Fazi. Without them I would never have been able to write this the-sis.

References

Roberto Baldacci, Aristide Mingozzi, and Roberto Wolfler Calvo. An exact method for the

capac-itated location-routing problem. Operations

Re-search, 59(5):1284–1296, 2011.

Jos´e-Manuel Belenguer, Enrique Benavent,

Chris-tian Prins, Caroline Prodhon, and Roberto Wolfler Calvo. A branch-and-cut method for the capaci-tated location-routing problem. Computers & Op-erations Research, 38(6):931–941, 2011.

Claudio Contardo, Jean-Fran¸cois Cordeau, and

Bernard Gendron. An exact algorithm based

on cut-and-column generation for the capacitated location-routing problem. INFORMS Journal on Computing, 26(1):88–102, 2013.

Jean-Francois Cordeau and Gilbert Laporte. Tabu search heuristics for the vehicle routing problem. Springer, 2005.

Jean-Fran¸cois Cordeau, Michel Gendreau, Alain

Hertz, Gilbert Laporte, and Jean-Sylvain Sormany. New heuristics for the vehicle routing problem. Springer, 2005.

Jean-Fran¸cois Cordeau, Gilbert Laporte, Martin WP

(14)

Transportation, handbooks in operations research and management science, 14:367–428, 2006. George B Dantzig and John H Ramser. The truck

dispatching problem. Management science, 6(1): 80–91, 1959.

Merrill M Flood. The traveling-salesman problem. Operations Research, 4(1):61–75, 1956.

Michel Gendreau, Gilbert Laporte, and J-Y Potvin. Metaheuristics for the capacitated vrp. In The ve-hicle routing problem, pages 129–154. Society for Industrial and Applied Mathematics, 2001. Fred Glover and Manuel Laguna. Tabu search, 1997. Patrick Krolak, Wayne Felts, and George Marble. A man-machine approach toward solving the trav-eling salesman problem. Communications of the ACM, 14(5):327–334, 1971.

Gilbert Laporte. Location-routing problems. In B L Golden and A A Assad, editors, Vehicle Routing: Methods and Studies, pages 163–196. North Hol-land, Amsterdam, 1988.

Gilbert Laporte. A survey of algorithms for location-routing problems. Investigaci´on Operativa, 1(2): 93–118, 1989.

Gilbert Laporte. What you should know about the vehicle routing problem. Naval Research Logistics, 54(8):811–819, 2007.

Gilbert Laporte. Fifty years of vehicle routing. Trans-portation Science, 43(4):408–416, 2009.

Gilbert Laporte and Yves Nobert. Exact algorithms for the vehicle routing problem. Surveys in Com-binatorial Optimization, 31:147–184, 1987.

G´abor Nagy and Sa¨ıd Salhi. Location-routing:

Is-sues, models and methods. European Journal of Operational Research, 177(2):649–672, 2007. Manfred Padberg and Giovanni Rinaldi. A

branch-and-cut algorithm for the resolution of large-scale symmetric traveling salesman problems. SIAM re-view, 33(1):60–100, 1991.

Christian Prins, Caroline Prodhon, and

Roberto Wolfler Calvo. Solving the

capac-itated location-routing problem by a grasp

complemented by a learning process and a path relinking. 4OR, 4(3):221–238, 2006.

Christian Prins, Caroline Prodhon, Angel Ruiz, Patrick Soriano, and Roberto Wolfler Calvo. Solv-ing the capacitated location-routSolv-ing problem by a cooperative lagrangean relaxation-granular tabu

search heuristic. Transportation Science, 41(4):

470–483, 2007.

Gerhard Reinelt. Tsplib—a traveling salesman prob-lem library. ORSA journal on computing, 3(4):376– 384, 1991.

Gerhard Reinelt. Fast heuristics for large geometric traveling salesman problems. ORSA Journal on computing, 4(2):206–217, 1992.

Said Salhi and Graham K Rand. The effect of ignor-ing routes when locatignor-ing depots. European journal of operational research, 39(2):150–156, 1989. Paolo Toth and Daniele Vigo. The vehicle routing

(15)

Appendices

Table 5: List of Symbols Model Parameters

n number of customers

m number of pick-up points

o number of depots

Cijp pick-up cost of customer j at

pick-up point i

Cd

ij distribution cost for

travel-ling from i to j

Wi capacity of pick-up point i

Oi operating cost of pick-up

point i

dj demand of customer j

k number of vehicles

Q vehicle capacity

F fixed vehicle cost

Decision Variables

yi= 1 if pick-up point i ∈ I is

opened

xijk= 1 if edge (i, j) is traversed

from i to j in the route per-formed by vehicle k ∈ K

zij= 1 if customer j is assigned to

pick up at facility i ∈ I ∪ P

fij= 1 if customer j is assigned to

receive delivery from depot i ∈ P

Heuristic Parameters

stoppingcriterion number of iterations

maxlengthtabulistswitch length of the tabu list of the

switch patient algorithm

maxlengthtabulist length of the tabu list of the

pairwise exchange

maxiterations-two-opt number of iterations of the

two opt algorithm

Table 6: n = 3, m = 2

Instance Solver Heuristic Gap (%)

1 122 139 13.44 % 2 128 128 0.00 % 3 127 127 0.00 % 4 89 89 0.00 % 5 80 80 0.00 % 6 125 125 0.00 % 7 128 130 1.83 % 8 92 110 20.43 % 9 144 144 0.00 % 10 93 93 0.00 % Table 7: n = 4, m = 2

Instance Solver Heuristic Gap (%)

1 148 148 0.00 % 2 167 167 0.00 % 3 161 162 0.16 % 4 146 146 0.00 % 5 161 170 5.44 % 6 142 142 0.00 % 7 160 164 2.72 % 8 147 147 0.00 % 9 89 89 0.00 % 10 83 83 0.00 % Table 8: n = 5, m = 2

Instance Solver Heuristic Gap (%)

(16)

Table 9: n = 5, m = 3

Instance Solver Heuristic Gap (%)

1 200 200 0.00 % 2 189 189 0.00 % 3 129 139 7.36 % 4 141 167 18.23 % 5 181 181 0.00 % 6 131 131 0.00 % 7 127 127 0.11 % 8 103 103 0.00 % 9 170 171 0.42 % 10 148 148 0.00 % Table 10: n = 6, m = 3

Instance Solver Heuristic Gap (%)

1 220 240 8.89 % 2 180 194 7.64 % 3 208 215 3.59 % 4 186 186 0.00 % 5 194 206 6.18 % 6 186 201 7.84 % 7 187 187 0.00 % 8 186 203 9.14 % 9 219 219 0.00 % 10 190 211 11.16 % Table 11: n = 7, m = 3

Instance Solver Heuristic Gap (%)

1 185 185 0.00 % 2 226 229 1.16 % 3 230 250 8.75 % 4 180 202 11.81 % 5 270 271 0.37 % 6 191 218 14.54 % 7 171 171 0.00 % 8 198 204 2.95 % 9 159 159 0.00 % 10 217 237 9.21 % Table 12: n = 8, m = 3

Instance Solver Heuristic Gap (%)

1 179 179 0.00 % 2 225 249 10.60 % 3 250 250 0.00 % 4 197 197 0.00 % 5 242 244 0.66 % 6 196 211 7.81 % 7 295 295 0.00 % 8 202 222 10.02 % 9 254 256 0.58 % 10 242 242 0.00 % Table 13: n = 9, m = 3

Instance Solver Heuristic Gap (%)

1 278 278 0.00 % 2 243 243 0.00 % 3 302 309 2.30 % 4 226 245 8.02 % 5 257 257 0.00 % 6 217 217 0.00 % 7 227 230 1.40 % 8 272 272 0.00 % 9 262 283 8.26 % 10 203 214 5.29 % Table 14: n = 10, m = 5

Instance Solver Heuristic Gap (%)

(17)

Table 15: n = 11, m = 5

Instance Solver Heuristic Gap (%)

1 271 288 6.04 % 2 301 304 0.90 % 3 269 291 8.25 % 4 274 274 0.00 % 5 273 273 0.00 % 6 318 340 6.89 % 7 233 240 2.95 % 8 307 311 1.44 % 9 259 259 0.00 % 10 265 266 0.68 % Table 16: n = 12, m = 5

Instance Solver Heuristic Gap (%)

1 311 316 1.58 % 2 269 269 0.00 % 3 338 395 16.85 % 4 281 281 0.00 % 5 248 288 16.15 % 6 300 312 3.91 % 7 258 259 0.51 % 8 315 318 0.86 % 9 256 259 1.15 % 10 313 321 2.72 % Table 17: n = 13, m = 5

Instance Solver Heuristic Gap (%)

1 285 285 0.00 % 2 333 333 0.00 % 3 269 269 0.00 % 4 265 265 0.00 % 5 320 329 2.85 % 6 319 319 0.00 % 7 331 331 0.00 % 8 366 366 0.00 % 9 338 390 15.49 % 10 359 359 0.00 % Table 18: n = 14, m = 5

Instance Solver Heuristic Gap (%)

1 329 337 2.32 % 2 353 361 2.21 % 3 327 334 2.22 % 4 333 344 3.42 % 5 309 311 0.58 % 6 336 336 0.27 % 7 320 320 0.00 % 8 328 332 1.45 % 9 286 301 5.12 % 10 284 300 5.63 % Table 19: n = 15, m = 5

Instance Solver Heuristic Gap (%)

1 323 327 1.34 %

2 349 350 0.39 %

(18)

Table 20: Testing the intensification phase on TSP instances

Optimum NNA Pairwise Exchange 2-Opt

instance n value value gap value gap value gap

(19)

Algorithm 2: Generate Initial Solution

Input: m, n, o, Wi, Oi, dj, F, Q, Cijd, C

p ij

for every customer do

if allocating to nearest pick-up point is cheaper

than average Cijd then

Allocate him/her to pickup; else

Allocate him/her to delivery end

end end

for every customer allocated to pickup do if nearest pick-up point available then

Allocate to pick-up point and update zij;

else

Allocate him/her to delivery end

end end

for every customer (i) allocated to delivery do if distance to depot < shortest distance then

update shortest distance; closest customer = i; end

end

Update the relevant variables (xijk, route);

while remainingcustomers is non-empty do shortestdistance = inf;

for every customer (i) in remainingcustomers do

if distance between closest customer and i < shortestdistance then

shortestdistance = distance between closest customer and i;

next customer = i; end

end

Go to next customer (update xijk and route);

Delete next customer from remainingcustomers; closest customer = next customer;

end

Go back to the depot (update xijkand route);

optimal-value = value of the initial solution; optimal-solution = initial solution;

return optimal-value, optimal-solution

Algorithm 3: Two Opt

Input: route, Cd

ij, maxlengthtabulist, n,

maxiterations-two-opt for i = 1 : maxiterations-two-opt do

find the best route in the neighborhood by using the Pairwise Exchange Algorithm (Algorithm 4); if the cost of the best neighbor < optimal-cost then

optimal-cost = the cost of the best neighbor; optimal-route = best route in the

neighborhood; end

route = best route in the neighborhood; end

(20)

Algorithm 4: Pairwise Exchange

Input: route, Cijd, tabulist maxlengthtabulist, n

for i = 1 : lenght of route − 1 do k = k + 1;

if i = 1 then start = [ ]; else

start = all elements of route untill index i - 1;

end end

middle = elements at index i and k of route; middle-inverse = the inverse of middle; ending = all elements of route after index k; new-route = [ start middle-inverse ending ]; if the cost of new-route < the cost of the best neighbor and new-route is not tabu then

best-neighbor = new-route;

the cost of best neighbor = the cost of new-route;

end end

if best-neighbor is assigned then i.e. it exists as a variable

best route in the neighborhood = best-neighbor; Update tabu list;

else

print ’The pairwise exchange algorithm terminates: all neighbors are tabu!’ ; break;

end end

return best route in the neighborhood, tabulist

Algorithm 5: Switch Customer

Input: pickup, Cijd, C

p

ij, Oi, Wi, m, o, zij, route,

maxlengthtabulistswitch, tabulist-switch if pickup is non-empty then

for every customer (i) in pickup do Calculate the pick-up cost;

Calculate the optimal-insertion-cost, and the corresponding optimal-route for inserting that customer in the current route; costsaving = pickupcost

-optimal-insertion-cost;

if costsaving > optimalsaving and i is not a member of tabulist-switch then

optimalsaving = costsaving; optimal-switch = i; post-switch-route = optimal-route; end end end

if route is non-empty then

for every customer (i) in route do

Calculate savings by deleting that customer from route;

Calculate the pick-up-cost of allocating him/her to the nearest (available) pick-up point: optimal-pick-up point. If no pick-up point is available, pick-up-cost = inf; cost-saving-switch = savings - pick-up-cost; if cost-saving-switch > optimalsaving and i is not a member of tabulist-switch then

optimalsaving = cost-saving-switch; optimal-switch = i; post-switch-allocation = optimal-pick-up point end end end

if optimal-switch is allocated then i.e. it exists as a variable

Update tabulist-switch; else

print ’Switch customer algorithm terminates: all customers are tabu!’ ; break;

end end

(21)

Algorithm 6: 2-Opt (incl. Randomness)

Input: route, Cd

ij

improve = 0;

best cost = cost of route;

size = number of customers belonging to route; while improve ≤ 1000 do

new route = route;

i = random number between 1 and size - 1; k = random number between i+1 and size; if i == 1 then

start = []; else

start = new route(1) untill new route(i-1);

end end

middle = new route(i) untill new route(k); middle inverse = inverse of middle; end = new route(k) untill new route(end); new route=[start middle inverse end]; new cost = cost of new route; if new cost ≤ best cost then

improve = 0; route = new route; optimal route = route; best cost = new cost; end

improve = improve + 1; end

(22)

0 100 200 300 400 500 600 700 o b je ct iv e v al u e stoppingcriterion n = 5, m = 5 n = 10, m = 5 n = 15, m = 5 n = 18, m = 5 n = 18, m = 10

Figure 1: Objective value as a function of stopping criterion for smaller cases

0 200 400 600 800 1.000 1.200 1.400 1.600 1.800 2.000 1 5 10 15 20 25 30 35 40 45 50 100 1000 o b ject iv e va lu e stoppingcriterion n = 20, m = 5 n = 50, m = 5 n = 100, m = 5 n = 100, m = 10 n = 200, m = 10

(23)

360 380 400 420 440 460 480 1 5 10 15 20 25 30 35 40 45 50 100 1000 ob je ct iv e v al u e stoppingcriterion maxlengthtabulistswitch = 1; maxlengthtabulistswitch = 5; maxlengthtabulistswitch = 10; maxlengthtabulistswitch = 15; maxlengthtabulistswitch = 17;

Referenties

GERELATEERDE DOCUMENTEN

We also compare our ALNS heuristic against best solutions on benchmark instances of two special cases of our problem, the vehicle routing problem with simultaneous pickup and

The first group of their heuristics includes heuristic approaches based on modeling the JS-TSP as the TSP using lower bounds on the number of tool switches as edge weights such as

These three settings are all investigated for the same input set with 100 locations: one distribution center, nine intermediate points and 190 customer locations; the demand range

Default target for nested tabu environments is always \linewidth, which equals to the column width inside p, m, b and X columns.. • As long as the \halign content is expanded more

The present study investigated whether customer centric product positioned search engine advertisements could have a positive effect on customer responses and whether this effect was

The objective of this model is to minimize the transportation cost, which is based on the routing distance of the cargo bikes, but includes also the fixed cost, for opening a

Key words: Vehicle routing problem, pickup and delivery, time windows, Tabu Search, heuristic, transportation planning, inland terminal, Port of

Tijdens de archeologische begeleiding van het afgraven van de teelaarde op de verkaveling Perwijsveld werden geen archeologisch waardevolle resten aangetroffen. Het terrein kan dan