1 Optimales Recycling - Ruhr-Universität Bochum, 15.02.2013 2 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Outlook 1
Introduction and Motivation 3 Capacitated Vehicle Routing Problem Depot Customer location Requested product type Q = 40 1 12 2 8 3 10 18 Q Demand (non-negative) Vehicle capacity 0 6 9 Each demand must be satisfied by a single delivery (no split deliveries) All distances are known Minimize the total length of all tours 7 18 4 8 8 3 5 4 9 5 Introduction and Motivation 4 Capacitated Vehicle Routing Problem Depot Customer location Requested product type Q = 40 1 12 2 8 3 10 18 Q Demand (non-negative) Vehicle capacity 0 6 9 Each demand must be satisfied by a single delivery (no split deliveries) All distances are known Minimize the total length of all tours 7 18 4 8 8 3 5 4 9 5 2
Introduction and Motivation 5 A Glass Waste Collection Problem Introduction and Motivation 6 A Glass Waste Collection Problem North 3
Introduction and Motivation 7 A Glass Waste Collection Problem Extension of the Capacitated Vehicle Routing Problem w.r.t. the following aspects: Several product types have to be collected from (distributed to) the customer locations The capacity of each vehicle can be divided individually into different compartments such that several product types can be collected (distributed) on each tour. Multi-Compartment Vehicle Routing Problem (MCVRP) 8 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Summary and Outlook 4
Problem Definition 9 The Multi-Compartment Vehicle Routing Problem Depot Customer locations Product types 1 0 12 2 2 12 0 5 3 4 10 14 6 13 20 Demands (non-negative) Each demand must be satisfied by a single delivery (no split deliveries) All distances are known and symmetric Minimize the total length of all tours 7 0 18 8 4 6 13 20 0 8 12 0 0 6 7 7 4 5 16 4 1 9 9 7 0 Problem Definition 10 The Multi-Compartment Vehicle Routing Problem Vehicles and Compartments A sufficiently large number of homogeneous vehicles is available, each of which providing an identical total capacity Q. Each vehicle serves a single tour if being used. The total capacity Q of each vehicle can be divided individually into a limited number of compartments The size of each compartment has to be selected from a discrete set of potential compartment sizes, e.g. it may make up for 10%, 20%,, 100% of the total capacity Q To each compartment only a single product type can be assigned The capacity of each compartment must not be exceeded 5
Problem Definition 11 The Multi-Compartment Vehicle Routing Problem Decisions Location-Vehicle-Assignment: Which locations should be visited by each vehicle? Location-Sequencing: In which sequence should the locations be visited by each vehicle? Compartment-Vehicle-Assignment: How should the total capacity of each vehicle be divided into compartments? Product-Compartment-Assignment: Which products should be assigned to each compartment of each vehicle? Objective Function Minimize the total tour length, i.e. the sum of all distances traveled by all vehicles Problem Definition 12 A Solution to the MCVRP Vehicle 1 Vehicle 2 2 3 1 0 12 2 12 0 5 4 10 14 1 12 2 3 4 10 0 6 7 7 4 0 7 6 7 0 18 8 4 6 13 20 8 12 0 0 5 16 4 1 9 9 7 0 7 4 6 13 8 12 0 16 5 9 9 7 Assigned products: Assigned products: 6
Introduction and Motivation 13 The Multi-Compartment Vehicle Routing Problem (MCVRP) Research Questions How can the MCVRP be formally represented (modeled)? How can the MCVRP be solved? Does it make sense to introduce vehicles with multiple (variable) compartments instead of serving the different product types separately? 14 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Summary and Outlook 7
Literarure Review 15 Literature Review: General Papers Derigs et al. (2011), OR Spectrum: Mathematical model, several solution approaches Mendoza et al. (2011), Transportation Science: Stochastic demands Muyldermans, Pang (2010), EJOR: Comparison of vehicle routing with and without compartments Literarure Review 16 Literature Review: Applications Fuel Delivery Avella et al. (2004), EJOR Brown, Graves (1981), Management Science Cornillier et al. (2002), EJOR Applications in Agriculture Caramia, Guerriero (2010), Interfaces Collection of milk at farms El Fallahi et al. (2008), C&OR: Distribution of animal food to farms 8
Literarure Review 17 Literature Review: Applications (cont.) Distribution Chajakis, Guignard (2003), J Global Optimization Delivery of food and grocery products to convenience stores Maritime Transportation Fagerholt, Christiansen (2000), JORS Literarure Review 18 Special Features of this particular MCVRP in Glass Waste Collection For each vehicle, the partition of the total capacity into compartments is not given in advance, but has to be fixed. For each vehicle, the partition of the total capacity into compartments can be different. For each vehicle, the number of compartments can be smaller than the number of product types (i.e. on each tour, only a limited number of product types may be collected / distributed). The total capacity of each vehicle can only be partitioned discretely (not: continuously) into different compartments. 9
19 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Outlook Mathematical Model 20 Symbols Index Sets Set of locations (i.e. set of nodes exclusive of the depot) Set of nodes (i.e. including the depot) Set of product types Set of vehicles Set of compartment size types 10
Mathematical Model 21 Symbols Constants c d Distance between nodes i and j i,j,i j Demand for product type p at location i i,p Q Total capacity of each vehicle q Relative size of a compartment of type s s in relation to the total capacity, e.g. 0.1, 0.2, s Maximum number of compartments per vehicle Mathematical Model 22 Symbols Variables w Binary variable i,k with 1, if location i is visited by vehicle k w 0, else. w Binary variable k with 1, if vehicle k is being used w 0, else. 11
Mathematical Model 23 Symbols Variables x Binary variable i, j, i j, k with 1, if the edge between locations i and j is travelled by vehicle k x 0, else. x Integer variable j,k with 2, if the edge from the depot to location j is travelled twice by vehicle k x 1, if the edge from the depot to location j is travelled once by vehicle k 0, else. Mathematical Model 24 Symbols Variables y Binary variable p,k,s with 1, if product p is assigned to a compartment of type s of vehicle k y 0, else. z Binary variable i,p,k with 1, if demand for product type p at location i is satisfied by vehicle k z 0, else. 12
Mathematical Model 25 Objective function Minimization of the total tour length: min c x : (1) Mathematical Model 26 Constraints Each demand must be satisfied: z 1 i,p,d 0 (2) A maximum number of vehicles may be used: x 2 (3) 13
Mathematical Model 27 Constraints The depot must be included in each tour: w w k (4) In order to satisfy its demand the corresponding location must be visited: z w i,p,k (5) Vehicle flow constraints: x x : : 2 w i, k (6) Mathematical Model 28 Constraints For each vehicle the number of compartments is limited: y s k (7) The capacity of each compartment must not be exceeded: d z Q q y p,k (8) The total capacity must not be exceeded: q y 1 k (9) 14
Mathematical Model 29 Constraints Subtour-elimination constraints: x 1 k,, 2 (10) Binary and integer constraints: w 0,1 x 0,1 i,k i,j,i j,k (11) (12) x 0,1,2 j,k (13) y 0,1 z 0,1 p,k,s S i,p,k (14) (15) 30 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Outlook 15
Variable Neighborhood Search 31 Variable Neighborhood Search with Multiple Starts (MS-VNS) Main Idea The algorithm consists of several large iterations (loops) In each loop an initial feasible solution is determined randomly Each initial solution is improved within several iterations by a VNS approach The best solution found in each loop is recorded Variable Neighborhood Search 32 MS-VNS for the MCVRP input: number of loops L, number of iterations in each loop N, problem data x 0 (x best ) = M; for l = 1 to L generate an initial solution x with objective function value x 0 (x) randomly; k := 1; for i = 1 to N select a neighbor x from neighborhood k of x (shaking); apply local search to x and determine a local minimum x ; if x 0 (x ) <= x 0 (x) then x := x ; k := 1; else k := k + 1; if k = k max + 1 then k := 1; endif endif endfor if x 0 (x) < x 0 (x best ) then x best := x; endif endfor output: x best 16
Variable Neighborhood Search 33 Generation of an Initial Solution All demands are randomly sequenced According to this sequence the demands are assigned one after another to a vehicle if: (1) The corresponding product type has already been assigned or can still be assigned to this vehicle (2) The vehicle capacity will not be exceeded Otherwise another vehicle is checked Variable Neighborhood Search 34 Neighborhood Structures k = 1: Demand Move A single demand is shifted from one tour to another. k = 2: Swap Move Two positions of two locations which are visited on the same tour are exchanged. k = 3: Shift Move A single location is moved from one position to another position of the same tour. 17
Variable Neighborhood Search 35 Local Search 2-opt Neighborhood Two non-adjacent edges are deleted from one tour and two new edges are inserted in the same (2-opt move). Strict Descent A 2-opt move is accepted, if the corresponding objective function value has been improved First Find The first 2-opt move which improves the current solution is accepted. Stopping Criterion The search stops if no improved solution exists in the neighborhood of the current solution. 36 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 6.1 Randomly Generated Problem Instances 6.2 Real-World Problem Instances 7. Outlook 18
Numerical Experiments 37 Problem Classes Input Parameters Number of locations: 10 Number of product types: 3, 6, 9 Maximum number of compartments: 3 product types: 2, 3 6 product types: 2, 4, 6 9 product types: 2, 4, 6 Numerical Experiments 38 Problem Classes Input Parameters Total demand per product type: ABC-distribution Number of product types demanded at each location: Small (up to 1 3 of the number of product types) Medium (between 1 3 and 2 3 of the number of product types) Large (between 2 3 and 3 3 of the number of product types) 50 instances per problem class 19
Numerical Experiments 39 Implementation Exact Approach Mathematical model implemented in Visual C++ Express 2010 with the ILOG CPLEX 12.4 interface on a 2,7GHz PC with 4GB memory Time limit for each instance: 12 hours Subtour-elimination constraints are added dynamically Numerical Experiments 40 Implementation Subtour-Elimination Constraints: x 1 k,, 2 (10) Number of Subtour-Elimination Constraints: #subtourelimination constraints # vehicles 1 5 10 10 959 4,795 9,590 # locations 15 32,633 163,165 326,330 20 1,048,346 5,241,730 10,483,460............ 40 >10 12 >10 12 >10 13 20
Problem Definition 41 Implementation A Solution of the MCVRP Relaxation 1 2 0 6 3 Addition of the respective subtour-elimination constraint: x x x 2 4 7 8 5 9 Numerical Experiments 42 Implementation Heuristic Approach Implemented in Visual C++ Express 2010 on a 2,7GHz PC with 4GB memory Algorithm parameters: 1,000 loops 10,000 iterations per loop 21
Numerical Experiments 43 Results: Computing Times Average computing time (seconds) per instance, exact approach #products 3 6 9 #compartments 2 3 2 4 6 2 4 6 s 1.8 1.3 56.0 4.1 3.2 1198.4 2 24.1 7.4 #demands m 4.6 1.6 575.1 12.1 6.0-3 546.0 201.4 l 2.8 1.6 1127.1 1 24.9 7.6-3 - 3-3 50 instances in each class 1 7 optimally solved instances only 2 16 optimally solved instances only 3 no optimally solved instances Numerical Experiments 44 Results: Computing Times Average computing time (seconds) per instance, VNS algorithm #products 3 6 9 #compartments 2 3 2 4 6 2 4 6 s 10.3 10.9 11.3 12.8 12.8 13.7 2 14.1 14.6 #demands m 11.8 11.8 17.3 15.0 14.2-18.3 16.9 l 16.4 11.6 20.0 1 19.0 15.4 - - - 50 instances in each class 1 based on 7 optimally solved instances 2 based on 16 optimally solved instances 22
Numerical Experiments 45 Results: Solution Quality of the VNS Algorithm Average deviation (%) per instance of the total tour length obtained by the VNS algorithm in comparison to the optimal total tour length #products 3 6 9 #compartments 2 3 2 4 6 2 4 6 s 0.0% 0.0% 0.0% 0.0% 0.1% 0.1% 2 0.1% 0.6% #demands m 0.0% 0.2% 0.1% 0.1% 2.3% - 0.7% 1.3% l 0.0% 0.0% 0.0% 1 0.0% 1.1% - - - 50 instances in each class 1 based on 7 optimally solved instances 2 based on 16 optimally solved instances Numerical Experiments 46 Results Main Findings Exact Solution Approach (Randomly Generated Problem Instances) Problem instances become harder with an increasing number of locations an increasing number of product types an decreasing maximum number of compartments per vehicle an increasing average number of demands per customer location Approach is only applicable to problem instances of limited size 23
Numerical Experiments 47 Results Main Findings VNS Approach (Randomly Generated Problem Instances) All instances could be solved in reasonable computing time (< 20 seconds) Computing times only vary slightly for different problem characteristics VNS achieves good results with a maximum average deviation from the optimal solution of 2.3% The solution quality deteriorates with an increasing number of product types 48 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 6.1 Randomly Generated Problem Instances 6.2 Real-World Problem Instances 7. Outlook 24
Numerical Experiments 49 Problem Classes Input Parameters Number of product types: 3 Number of locations: 28-37 Number of demands: 41 60 Maximum number of compartments: 2 (MCVRP) 1 (VRP) Numerical Experiments 50 Implementation Heuristic (VNS) Approach Algorithm parameters: Number of loops: 1,000 Number of iterations per loop: 10,000 Computing times: 119 170 seconds per instance 25
Numerical Experiments 51 Results: Solution Quality parameters total tour length (in km) #tours instance #locations #demands MCVRP VRP deviation MCVRP VRP 1 37 54 95.76 146.87 34.8% 2 3 2 30 49 82.34 122.84 33.0% 2 3 3 33 50 83.34 150.71 44.7% 3 4 4 30 49 92.96 133.47 30.3% 2 3 5 35 49 93.37 134.24 30.4% 2 3 6 35 55 82.55 150.65 45.2% 2 4 7 37 60 124.30 137.00 9.3% 3 3 8 33 54 94.34 134.85 30.0% 2 3 9 28 41 79.99 119.54 33.1% 2 3 10 30 48 81.20 121.07 32.9% 2 3 average 91.02 135.12 32.4% 2.2 3.2 Numerical Experiments 52 Results Main Findings (Real-World Problem Instances) All practical instances could be solved in acceptable computing time (< 3 minutes) The introduction of compartments will reduce the total distance to be travelled (total tour length) significantly, i.e. between 9 % and 45 % by almost 1/3 on average The reduction of the total tour length can be attributed to a significant reduction of the number of tours (one tour less on average) A reduction of the total tour length could also be obtained when the number of tours remained constant 26
53 1. Introduction and Motivation 2. Problem Definition 3. Literature Review 4. Mathematical Model 5. Variable Neighborhood Search 6. Numerical Experiments 7. Outlook Outlook 54 Outlook Further research on the described problem Experiments with VNS on larger problem instances, in particular w.r.t. different neighborhood structures Development of alternative heuristic solution approaches, e.g. large neighborhood search, tabu search, genetic algorithms etc. Further research on variants and extensions Consideration of stochastic demands Extension to multiple periods (individual tours with a rolling planning horizon; standard tours) 27
55 Thank your for your attention! Any questions? www.mansci.ovgu.de 28