hybrid genetic algorithm for solving multi constraint vehicle routing problem
DESCRIPTION
This presentation is my grad school's thesis seminar (September 2012). Still discuss about Vehicle Routing Problem (VRP), but with additional solving methods. The last presentation (discuss about VRPSPD) was only solved with Genetic Algorithm, however, in this presentation additional Local Search also used to help GA solved the problem faster and more efficient. That's why we call it "Hybrid Genetic Algorithm". The constraint itself also added, beside Simultaneous Pickup and Delivery (SPD), Time Window and Multi Trips are included. Hopefully this simple presentation could enhance your knowledge about VRP and Genetic Algorithm.TRANSCRIPT
Hybrid Genetic
Algorithm for Solving
Multi Constraint Vehicle
Routing Problem
Carry Prameswari23611001
Introduction
Previous Work
Hybrid Genetic Algorithm
Multi-Constraint VRP
Analysis
Conclusion and Future Work
Outline
Introduction
Find the minimum
total traveling distance
with CONSTRAINTS
that must be fulfilled
Introduction:Vehicle Routing Problem
Introduction:Vehicle Routing Problem
Airline businessShuttle Travel
LogisticSupply chain
Package delivery
NetworkingCommunication
VRP in our daily life
Previous Work
Previous Works
• Capacitated• Simultaneous
Pickup and Delivery
VRP
• Max. 12 Destination Point
Case Study• Genetic
Algorithm• Prins Splitting
Procedure
Method
BP
BA
C
DE
A:B:
C:
D:
E:
Previous WorksVRP with
Simultaneous Pick-up & Delivery Constraint
BP
BA
C
DE
A:B:
C:
D:
E:
Previous Works VRP with SPD and Vehicle spec.
constraint
Previous Works Genetic Algorithm
BP
BA
C
DE
BA C D E
1 2 3 4 5
Genetic AlgorithmInitializatio
n
Evaluation & Selection
Crossover
Mutatio
n
EvaluationSelection:
Roulette Wheel Procedure
10 9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
Novel Order Cross Over Inversion Mutation
1 2 3 4 5 6 7 8 9 101 2 3 8 9 104 5 6 7
1 2 3 4 5 6 7 8 9 10
Swapping Mutation
1 2 3 4 5 6 7 8 9 1084
Current Research
C VRP SPD
GA + Prins Slitting
Procedure
Local Search
Multi-Trips
Time Window
Previous Work
Add. Solving Method
Additional Constraints
SCOPE : Basic constraint CVRP-SPD.VRP TW only consider about travelling and service time .
Hybrid Genetic Algorithm
Hybrid Genetic Algorithm
GA
Local
Search
Hybrid Genetic Algorith
m
Position-Oriented Genes Exchange
Static Move Descriptor (SMD):a. 1-0 Exchange Moveb. 1-1 Exchange Movec. 2-opt Move
Hybrid Genetic Algorithm
Local Search: Position-Oriented Genes Exchange
1 2 3 4 5 2 1 3 4 52 1 3 4 53 2 1 4 54 2 3 1 55 2 3 4 1
1 2 3 4 51 3 2 4 51 4 3 2 51 5 3 4 2
1 2 3 4 5
Hybrid Genetic Algorithm
Local Search: 1-0 Exchange Move
1 2 3 4 5
1 3 1 3 2 4 5
2 5 1 2 5 3 4
New Chromosomes From 1-0 Exchange Move LS procedure
2 1 3 4 5
3 2 1 4 5
4 2 3 1 5
5 2 3 4 1
1 3 2 4 5
1 4 3 2 5
1 5 3 4 2
1 2 4 3 5
1 2 5 4 3
1 2 3 5 4
Local Search: 1-1 Exchange Move
Hybrid Genetic Algorithm
1 2 3 4 5
1 2 3 4 5
1 3 3 2 1 4 5
2 5 1 5 3 4 2
New Chromosomes From 1-1 Exchange Move LS procedure
1 3 2 4 5
1 4 2 3 5
1 5 2 3 4
1 2 4 3 5
1 2 5 3 4
1 2 3 5 4
1 2 3 4 5
1 2 3 4 5
1 3 3 4 5 1 2
2 4 1 4 5 2 3
Local Search: 2 - opt Exchange Move
Hybrid Genetic Algorithm
New Chromosomes From 2-opt Exchange LS procedure
2 3 4 5 1
3 4 5 1 2
4 5 1 2 3
5 1 2 3 4
1 3 4 5 2
1 4 5 2 3
1 5 2 3 4
1 2 4 5 3
1 2 5 3 4
1 2 3 5 4
Multi-Constraint VRP
Multi-Constraint VRP
BP
A
B
C
A:
B:C:
Vehicle Capacity : 5 paxSolution:
1st trip: Base – A – B – C – Base
2nd trip: Base – B – Base
Multi-Trips
Multi-Constraint VRP
Multi-TripsSteps taken to
tackle this
constraint
Point A B CDeliv 2 7 1
Pickup 6 4 2
Point A1 A2 B1 B2 CDeliv 2 0 5 2 1
Pickup 5 1 4 0 2
Solution:
1st trip: Base – A – B – C – Base
2nd trip: Base – A – B – Base
Exist demand that excess vehicle capacity?
Go to GA process
Go directly to the GA process
N
Y
Associate point coordinates to the basic
Reconstruct pick-up and delivery
demand
Associate pick-up and delivery
demand matrix
Reconstruct coordinate points
matrix according to the new demand
matrix
Multi-Constraint VRP
Multi-TripsCase Execution
Destination Point 1 2 3 4 5 6 7 8 9 10 B
Delivery Demand 5 3 16 4 2 2 20 1 2 4 -
Pickup Demand 4 1 18 3 1 1 18 2 4 3 -
Coordinate X 6 8 9 10 7 4 1 0 0 2 5
Coordinate Y 9 10 8 7 6 8 9 8 7 7 5
Vehicle Capacity15 pax
Trip Sequence Delivery Pick-up1st trip: base – 1 – 2 – 3 – 4 – 5 – base
2nd trip: base – 3 – base3rd trip: base – 7 – base4th trip: base – 6 – 7 – 8 – 9 – 10– base
Point 1 : 5Point 2 : 3Point 3 : 1Point 4 : 4Point 5 : 2Point 3 : 15Point 7 : 15Point 6 : 2Point 7 : 5Point 8 : 1Point 9 : 2Point 10 : 4
Point 1 : 4Point 2 : 1Point 3 : 3Point 4 : 3Point 5 : 1Point 3 : 15Point 7 : 15Point 6 : 1Point 7 : 3Point 8 : 2Point 9 : 4Point 10 : 3
Multi-Constraint VRP
Time Window
time interval, given an earliest arrival time and latest arrival time.
considering service time and total traveling time.
determine the optimal route for both customer’s delivery and pick-up demand to destination point which have specified time
Key point
Multi-Constraint VRP
Time WindowChange the matrix of distance into travel time matrix
Fitness function adjustmentTime calculation the main object of the calculation
Final display adjustment:present the departure and arrival time at each point of the optimal route obtained
Steps taken to
tackle this
constraint
Destination Point 1 2 3 4 B
Coordinate X 40 45 60 65 50
Coordinate Y 70 90 80 60 50
Service time (minutes)
10 10 10 10 10
Earliest Arrival (EA) 7.00 7.00 7.30 6.00 ~
Latest Departure (LD)
8.30 8.30 9.00 7.30 ~
Multi-Constraint VRPTime Window
Case Execution
Total Dist : 128.68
Total Dist 128.68
Multi-Constraint VRP
Time WindowCase Execution
Destination Point
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 B
Delivery Demand
30 20 10 20 0 10 30 10 10 10 20 20 20 10 10 -
Pickup Demand
30 10 10 10 10 10 10 20 40 10 30 40 30 10 20 -
Coordinate X
68 66 65 65 63 60 60 67 65 62 62 60 60 58 55 40
Coordinate Y
60 55 55 60 58 55 60 85 85 82 80 80 85 75 80 50
Service time (minutes)
20 40 40 20 30 30 30 20 10 30 10 10 20 10 30 -
Analysis
Analysis
Local Search Placement Analysis
Local Search Comparison
Analysis
Local Search Performance
Analysis
Analysis
Analysis
Analysis
Case Study
Destination Point
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 B
Delivery Demand
30 20 10 20 0 10 30 10 10 10 20 20 20 10 10 -
Pickup Demand
30 10 10 10 10 10 10 20 40 10 30 40 30 10 20 -
Coordinate X 68 66 65 65 63 60 60 67 65 65 62 60 60 58 55 40
Coordinate Y 60 55 55 60 58 55 60 85 85 82 80 80 85 75 80 50
Parameters:
Vehicle capacity (Q)= 150Max. distance (D) = 4000Number of vehicle (H)= 2Penalty Function (PF) = 1000000Population Size = 40Max Generation = 100Crossover Probability = 0.85Muatation Probability = 0.05
Optimal Fitness Value : 189.651
Selected chromosome
Calculate distance using Prins Splitting
Procedure
Performed Local Search
For 1 to number of Genes:
Find better chromosome? SaveY
N
Local Search as a Fitness Function
End
Generate initial population
Evaluate each chromosome
(Procedure on the next flowchart)
Population converged or
Max. Generation reached?
Selection
Reproduction(Procedure on the next
flowchart)
Select two parent chromosomes
Mutation (probability)?
Crossover (probability)?
Child = Parent 1
Child = Parent 1
Perform Crossover
YN
YN
Calculate distance using Prins Splitting
Procedure
Performed Local Search
Find better chromosome?
Child = New chromosome
Y
Child = Parent 1
Local Search as a Mutation Procedure
Analysis
Local Search Placement Analysis
No.Placement of Local Search
Mean
Fitness Value
No. of VehicleComputational Time (second)
1As a Fitness
Function201.21 2.2 714.88
2As a Mutation
Procedure190.83 2.3 43.14
Analysis
No. Type of Local Search
Mean
Fitness Value No. of VehicleComputational
Time (second)
1 PLS 190.83 2.3 43.13
A 1-1 exchange move 190.99 2.34 28.93
B 1-0 exchange move 190.66 2.37 28.55
C 2-2 opt exchange move 192.23 2.42 13.67
2 A+B 202.24 2.25 65.34
3 A+C 192.56 2.38 22.73
4 B+C 197.21 2.5 30.79
5 A+B+C 200.73 2.26 63.47
Local Search Comparison Analysis
Analysis
Local Search Performance Analysis
15 point 20 point 25 point 30 point 35 point
Q=120; Q=140; Q=230; Q=200; Q=250;
D=1000; D=1000; D=1000; D=1000; D=1000;
H=10; H=10; H=10; H=10; H=10;
PF=1000000; PF=1000000; PF=1000000; PF=1000000; PF=1000000;
PopSize = 80; PopSize = 100; PopSize = 150; PopSize = 200; PopSize = 100;
MaxG = 300; MaxG = 300; MaxG = 500; MaxG = 550; MaxG = 600;
Pcrsovr = 0.9; Pcrsovr = 0.9; Pcrsovr = 0.9; Pcrsovr = 0.9; Pcrsovr = 0.9;
Pmut = 0.1; Pmut = 0.1; Pmut = 0.1; Pmut = 0.1; Pmut = 0.1;
Optimal Route:Base-11-14-15-13-12-Base
Base-7-10-6-3-2-BaseBase-1-5-8-9-4-Base
Fitness Value:71.8003
Number of Vehicle used:3
Computational Time:97.799 sec
Optimal Route:Base-17-20-19-15-14-Base
Base-1-5-8-9-6-BaseBase-2-3-10-7-4-12-BaseBase-18-16-13-11-Base
Fitness Value:95.4184
Number of Vehicle used:4
Computational Time:397.873217 sec
AnalysisLocal Search Performance Analysis
Optimal Route:Base-16-17-20-19-15-14-13-7-Base
Base-2-5-3-6-10-9-8-4-1-BaseBase-21-22-24-25-23-28-12-11-Base
Fitness Value:95.1245
Number of Vehicle used:3
Computational Time:1670.22 sec
Optimal Route:Base-6-8-9-10-7-4-Base
Base-13-11-2-23-24-5-3-1-12-BaseBase-16-18-17-19-20-14-15-Base
Base-30-22-25-26-29-28-27-21-BaseFitness Value:
133.29Number of Vehicle used:
4Computational Time:
5204.85 sec
AnalysisLocal Search Performance Analysis
Optimal Route:Base-7-6-9-3-21-23-2-5-8-10-Base
Base-4-1-12-16-17-BaseBase-18-20-19-15-14-13-11-Base
Base-33-32-31-34-35-30-28-29-22-26-BaseFitness Value:
149.3730Number of Vehicle used:
5Computational Time:
4089.0482
AnalysisLocal Search Performance Analysis
No.
Number of Point
Destination on Test
Case
Mean Mean of Fitness
Value−Optimal
Fitness Value (∆)Fitness Value No. of VehicleComputational
Time (second)
1 15 71.9201 3.2 99.0231 0.1198
2 20 97.8146 4.3 402.9787 2.3962
3 25 101.4521 3.5 1967.54 6.3276
4 30 165.956 4.4 5823.72 32.666
5 35 210.6423 5.5 4892.143 61.2703
Conclusion & Future Works
Conclusions
Hybrid Genetic Algorithm that combines Local Search and GA
has been successfully developed to solve multi constraint vehicle
routing problems
From 4 type of LS method, 1-0 exchange move is the most preferable method to be combined with GA
VRP with time window and multi-trips constraint could be solved
without causing major change in basic Hybrid GA solver
Future Works
Conclusions and Future Works
There are still a lot of constraints in VRP problem to be included, for instance:Multi vehicle, multi depot, split delivery
Comparison between GA with other heuristic method.
Thank You