Transcript Solving the Vehicle Routing Problem with Multiple Multi
Solving the Vehicle Routing Problem with Multiple Multi-Capacity Vehicles
Michael Sanders
Overall Goals
Create a program that given: List of delivery points Number and capacity of vehicles Working route finder Return a list of routes that efficiently utilizes vehicles Efficiency defined as distance traveled over product delivered
Scope
Select/develop a working heuristic for solution finder Several possibilities from previous research Decided on a genetic algorithm
Previous Research
Vehicle Routing Problem (VRP) Extensively researched Solutions Agent architecture Used agents to represent vehicles and “auctioneer” that assigned customers to routes Ant colony optimization Could solve variants of VRP
Variants of VRP
Variants VRP with Time Windows (VRPTW) Requires deliveries to be in specific time ranges for each delivery Multi-Depot VRP (MDVRP) Multiple origins for vehicles
Components
Route finder Given two intersections, find shortest distance route between the two Not necessarily fastest route Would need speed limit data Solution finder Using list of delivery points and quantity to be delivered, utilizes other component to most efficiently deliver the product
Route Finder
Had attempted to write own route finder program Failed due to data reliability Researched free commercial options
Solution Creator
Uses three types of genetic operations to find better solutions Creates a set of Route objects Each has unique vehicle assigned The whole set has deliveries to entire customer list Route objects are “genes” that are operated on
Genetic Operations
Swap Two deliveries on two different routes are switched Randomize The points on a route are randomly reordered
Genetic Operations
Insert A delivery point from one route is deleted from that route and added to another
Testing
Following slide will show percentages Percentages represent the final solution’s total distance traveled, as a percentage of the original, randomly-created solution’s total distance traveled
10,000 Generations
Swap 0.921
Insert 0.833
Rand.
0.93
Swap +Insert 0.89
Swap +Rand.
0.933
Insert +Rand. All 0.884
0.901
0.92
0.905
0.875
0.863
0.92
0.938
0.915
0.892
0.901
0.937
0.894
0.924
0.904
0.913
0.935
0.862
0.945
0.85
0.89
0.92025 0.85825 0.93325 0.88675 0.91525
0.944
0.929
0.9115 0.91175
Test Code
gen_algs $swap1, true, false, false gen_algs $rand1, false, false, true gen_algs $swapRand1,true, false, true gen_algs $insertRand1,false, true, true gen_algs $insert1,false, true, false gen_algs $insert2,false, true, false gen_algs $swapInsert1,true, true, false gen_algs $swapInsert2,true, true, false gen_algs $all1, true, true, true gen_algs $all2, true, true, true
Results
Most efficient method: Use two arrays using insert method Average of 85.75% distance traveled versus original solution
Other Information
Language Ruby Problems Route finder Data not completely standardized
Main Points
Optimum answer not necessarily goal Finding optimum is too time-intensive Drivers have personal knowledge of routes and can adapt as necessary More genetic operations are not necessarily better Using all genetic operations usually resulted in moderate results
Extensions
Addition of working route finder Will result in fully functional program Further optimization of genetic algorithms Increase or decrease chance of mutation Implement different operations