Top Banner
Vehicle Routing & Scheduling Multiple Routes Construction Heuristics – Sweep Nearest Neighbor, Nearest Insertion, Savings Cluster Methods Improvement Heuristics Time Windows
42

Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Dec 17, 2015

Download

Documents

Lee Lawson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Vehicle Routing & Scheduling

• Multiple Routes

• Construction Heuristics– Sweep– Nearest Neighbor, Nearest Insertion, Savings– Cluster Methods

• Improvement Heuristics

• Time Windows

Page 2: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Multiple Routes

• Capacitated VRP: vehicles have capacities. – Weight, Cubic feet, Floor space, Value.

• Deadlines force short routes.– Pickup at end of day.– Deliver in early morning.

• Time windows– Pickup.– Delivery.– Hard or Soft.

Page 3: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Multiple Route Solution Strategies

• Find feasible routes.

– Cluster first, route second.• Cluster orders to satisfy capacities.• Create one route per cluster. (TSP for each cluster)

– Route first, cluster second.• Create one route (TSP).• Break route into pieces satisfying capacities.

– Build multiple routes simultaneously.

• Improve routes iteratively.

Page 4: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Sweep Algorithm

• Draw a ray starting from the depot.

• Sweep clockwise (or counter-clockwise) and add customers to the route as encountered.

• Start a new route when vehicle is full.

• Re-optimize each route (solve a TSP for customers in each route).

Page 5: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Sweep Algorithm

depot

Suppose each vehicle capacity = 4 customers

depot

Page 6: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Nearest Neighbor, Nearest Insertion & Savings Algorithms

• Similar to for TSP, but keep track of demand on route.

• Start new route when vehicle is full.

• Re-optimize each route (solve a TSP for customers in each route).

Page 7: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Nearest Neighbor Algorithm

depot

Suppose each vehicle capacity = 4 customers

depot

First route

Page 8: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Third route depot

Nearest Neighbor Algorithm

Suppose each vehicle capacity = 4 customers

depot

Second route

Page 9: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Cluster Algorithms

• Select certain customers as seed points for routes.– Farthest from depot.– Highest priority.– Equally spaced.

• Grow routes starting at seeds. Add customers:– Based on nearest neighbor or nearest insertion– Based on savings.– Based on minimum angle.

• Re-optimize each route (solve a TSP for customers in each route).

Page 10: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Cluster with Minimum Angle

depot

Suppose each vehicle capacity = 4 customers

Select 3 seeds

depot

Add customers with minimum angle

Page 11: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Cluster with Minimum Angle

depot

Suppose each vehicle capacity = 4 customers

Add customers with minimum angle

Page 12: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Cluster with Minimum Angle

Suppose each vehicle capacity = 4 customers

depot

Add customers with minimum angle

Page 13: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

VRP Improvement Heuristics

• Start with a feasible route.

• Exchange heuristics within a route.– Switch position of one customer in the route.– Switch 2 arcs in a route.– Switch 3 arcs in a route.

• Exchange heuristics between routes.– Move a customer from one route to another.– Switch two customers between routes.

Page 14: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Improvement Heuristics

depot

Cluster with Minimum Angle

depot

“Optimized” routes Starting routes

Page 15: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Time Windows

• Problems with time windows involve routing and scheduling.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-10]

3,[2-4]

Customer number

Start and end of time window (2 pm - 4 pm)

Page 16: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Routing Example with Time Windows

Page 17: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Insert nearest customer to route in best location.

depot

3

1 2

6

4

5

Nearest Insertion - No Time Windows

depot

3

1 2

6

4

5

Page 18: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Insert nearest customer to route in best location.

depot

3

1 2

6

4

5

Nearest Insertion - No Time Windows

depot

3

1 2

6

4

5

Page 19: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Insert nearest customer to route in best location.

depot

3

1 2

6

4

5

Nearest Insertion - No Time Windows

depot

3

1 2

6

4

5

Page 20: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 8:00 - 11:00Arrive at 1: 9:00 - 12:00Leave 1: 9:30 - 12:30

Nearest Insertion with Time Windows

depot-1

Page 21: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 10:30Arrive at 1: 11:30Leave 1: 12:00Arrive at 2: 1:00Leave 2: 1:30

Nearest Insertion with Time Windows

depot-1-2

Page 22: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 9:00Arrive at 1: 10:00Leave 1: 10:30Arrive at 4: 11:30Leave 4: 12:00 Arrive at 2: 1:00Leave 2: 1:30

Nearest Insertion with Time Windows

depot-1-4-2

Page 23: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 8:00Arrive at 1: 9:00Leave 1: 9:30 Arrive at 5: 10:30Leave 5: 11:00 Arrive at 4: 12:00Leave 4: 12:30 Arrive at 2: 1:30Leave 2: 2:00

Nearest Insertion with Time Windows - one option

depot-1-5-4-2

Page 24: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 7:30Arrive at 5: 8:30Leave 5: 9:00Arrive at 4: 10:00Leave 4: 10:30 Arrive at 1: 11:30Leave 1: 12:00Arrive at 2: 1:00Leave 2: 1:30

Nearest Insertion with Time Windows - a better option

depot-5-4-1-2

Page 25: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 7:30Arrive at 5: 8:30Leave 5: 9:00Arrive at 4: 10:00Leave 4: 10:30 Arrive at 1: 11:30Leave 1: 12:00Arrive at 2: 1:00Leave 2: 1:30Arrive at 3: 2:30Leave 3: 3:30

Nearest Insertion with Time Windows

depot-5-4-1-2-3

Page 26: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

One hour travel time between any two customers. Half hour delivery time at each customer.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Leave depot: 7:00Arrive at 5: 8:00Leave 5: 8:30Arrive at 6: 9:30Leave 6: 10:00Arrive at 1: 11:00Leave 1: 11:30 Arrive at 4: 12:30Leave 4: 1:00Arrive at 2: 2:00Leave 2: 2:30Arrive at 3: 3:30

Nearest Insertion with Time Windows

depot-5-6-1-4-2-3

Page 27: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[10-2]

5,[8-11]

Route must be built with both time windows & geography in mind!

Routing with Time Windows

Page 28: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Clustering and Time Windows

• Cluster customers based on location and time window.

• Design routes for each cluster.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[3-5]

5,[8-11]

Page 29: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Clustering and Time Windows

• Cluster customers based on location and time window.

• Design routes for each cluster.

depot

3,[2-4]

1, [9-12] 2,[1-3]

6,[9-12]

4,[3-5]

5,[8-11]

Page 30: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

ArcLogistics Route Solution Technique

• Construct travel time (distance) matrix.– Shortest paths on actual (GIS) road network.

• Build initial routes by inserting orders on routes. – Can not exceed vehicle capacities, precedence rules,

skill set constraints (specialties).– Can violate time windows and route duration.

• Improve routes.– Within route improvements.– Between route improvements.

Page 31: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

• Objective: Minimize weighted sum of:– travel times (t), – time window violations (v), and – free (waiting) time (w).

1tr + 2vr + 3wr

• User sets weights 1, 2 , 3 via slider bar in “Rate the importance of meeting time windows”.– Lowest value = 0 is for lowest cost– Highest value = 10 is for most importance on meeting time

windows.

ArcLogistics Route Insertions

r

Page 32: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

ArcLogistics Route Improvements

• Within route (intra-route) improvements.– Maintain stops on each route.– Consider each route separately.– Find best position for each stop on each route.

• Between route (inter-route) improvements.– Transfer or switch: Move one stop from one route to

another.– Exchange: Exchange two stops between two routes.

Page 33: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Improvement Heuristics

depot

Starting routes

depot

“Improved” routes

Intra-route

improvement Inter-route

improvement

Page 34: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Modeling Details

• Road network.– How detailed is the road network?– Affects distance and cost calculations.

• Geocoding.– Where are addresses located?

• Linking locations to road network.– How do vehicles get from locations to road nework?

Page 35: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Road Network Detail

• Models should measure travel distance, time and cost on actual road network.

• More detailed road networks mean:– More accurate cost, distance and travel time.– Slower solutions.– Longer time to set up data.– Larger data files.

• What is purpose?– Operational: To provide detailed driving directions?– Strategic: To estimate costs, times, and routes?

Page 36: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Road Network Detail

• How are speeds specified?– Different types of roads have different speeds.– Hard to include time varying speeds.

• Showing every road may be unrealistic.– Large trucks may not use small local roads.

• Road network changes over time.– Example: new residential areas.– Are customers in older, established areas or newer

suburbs?

Page 37: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Geocoding

• Finding geographic locations from addresses.

• Depending on scale of problem, may geocode at various levels.

• Zip codes.– Geocode to a point at center of zip code.– Zip codes are defined with boundaries and centroids.

• Cities.– Geocode to a point representing city location.

Page 38: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Geocoding - Street Addresses

• Street addresses– Each road segment has associated address ranges on

each side.– Address is interpolated between start and end of

address range.– Assumes even spacing of addresses.

• Example: – Main Street, left side: 300-498, right side 301-499– 420 E. Main Street is about 60% of the way down the

road segment on the left side.

Page 39: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Address Matching

• Can be very complicated.

• Only part of address may match.– Street name, city and zip code match; address range

doesn’t.– Street name and city match; zip code doesn’t.

• Part of address may be incorrect.– Missing prefix (East).– Incorrect suffix (Street vs. Boulevard).– Name may be abbreviated in database (Ave for Avenue

or Avenida).– Zip code may be wrong.

Page 40: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Address Matching

• Streets may have several names.– Highway 67 is also Lindbergh Blvd.

• Streets change names, especially at city boundaries.– Lindbergh, Highway 67, Kirkwood Road.– Olive Boulevard, Olive Street, Olive Street Road, Old

Olive Street Road.

• New streets are added and old streets are renamed.

Page 41: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Linking Locations to Road Network

• User may specify locations not on streets.– User Pick in ArcLogistics Route.

• How should this be linked to street network?

• ArcLogistics Route forces locations not on streets to be on nearest street.

ArcLogistics Route assumes locations is here

Page 42: Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.

Linking Locations to Road Network

• Other packages assume straight line travel from nearest street intersection.

Some packages compares these distances.