Vous êtes sur la page 1sur 63

Vehicle Routing -I

Vehicle Routing -I
• Setup and Model.

• Problem Variety.
– Pure Pickup or Delivery Problems.
– Mixed Pickups and Deliveries.
– Pickup-Delivery Problems.
– Backhauls.
– Complications.
Vehicle Routing
• Find best vehicle route(s) to serve a set of orders
from customers.

• Best route may be


– minimum cost,
– minimum distance, or
– minimum travel time.

• Orders may be
– Delivery from depot to customer.
– Pickup at customer and return to depot.
– Pickup at one place and deliver to another place.
General Setup

• Assign customer orders to vehicle routes


(designing routes).

• Assign vehicles to routes.


– Assigned vehicle must be compatible with customers
and orders on a route.
• Assign drivers to vehicles.
– Assigned driver must be compatible with vehicle.
• Assign tractors to trailers.
– Tractors must be compatible with trailers.
Model

• Nodes: physical locations


– Depot.
4
– Customers. 5
1
6 4
• Arcs or Links depot 3
– Transportation links.
8
6 8 4
• Number on each arc
represents cost, distance,
or travel time.
Pure Pickup or Delivery

• Delivery: Load vehicle at depot. Design route to


deliver to many customers (destinations).

• Pickup: Design route to pickup orders from


many customers and deliver to depot.

• Examples:
– UPS, FedEx, etc.
– Manufacturers & carriers.
– Carpools, school buses, etc.

depot
Pure Pickup or Delivery

depot

depot
Which route is best????

depot
TSP & VRP

• TSP: Travelling Salesman Problem


– One route can serve all orders.

• VRP: Vehicle Routing Problem


– More than one route is required to serve all orders.

VRP
TSP

depot
depot
Mixed Pickup & Delivery

Pickup
Delivery

depot

• Can pickups and deliveries be made on same


trip?
• Can they be interspersed?
Mixed Pickup & Delivery
Separate routes
Pickup
Delivery

One Route
Not Interspersed
depot

Interspersed

depot

depot
Interspersed Routes Pickup
Delivery

F
• For clockwise trip: I
E H
D K
• Load at depot ACDFIJK A G
J
• Stop 1: Deliver A CDFIJK C
depot L
B
• Stop 2: Pickup B BCDFIJK

• Stop 3: Deliver C BDFIJK Delivering C requires moving B

• Stop 4: Deliver D BFIJK Delivering D requires moving B

• etc.
Pickup-Delivery Problems

• Pickup at one or more origin and delivery to one


or more destinations.

• Often long haul trips.

C
Pickup
Delivery B
A B
depot A
C
Intersperse Pickups and Deliveries?

• Can pickups and deliveries be interspersed?


C

Interspersed B
A B
depot A
C
Pickup
Delivery
C

Not Interspersed B
A B
depot A
C
Backhauls

• If vehicle does not end at depot, should it return


empty (deadhead) or find a backhaul?

– How far out of the way should it look for a backhaul?

C
Pickup
B
Delivery A B
depot A
C

D D
Backhauls

• Compare profit from deadheading and carrying


backhaul.

Pickup
Delivery
C

B
A B
depot A
C
Empty Return

D D
Backhaul
Complications
• Multiple vehicle types.

• Multiple vehicle capacities.


– Weight, Cubic feet, Floor space, Value.

• Many Costs:
– Fixed charge.
– Variable costs per loaded mile & per empty mile.
– Waiting time; Layover time.
– Cost per stop (handling).
– Loading and unloading cost.

• Priorities for customers or orders.


More Complications

• Time windows for pickup and delivery.


– Hard vs. soft

• Compatibility
– Vehicles and customers.
– Vehicles and orders.
– Order types.
– Drivers and vehicles.

• Driver rules (DOT)


– Max drive duration = 10 hrs. before 8 hr. break.
– Max work duration = 15 hrs. before 8 hr break.
– Max trip duration = 144 hrs.
Simple Models

• Homogeneous vehicles.

• One capacity (weight or volume).

• Minimize distance.

• No time windows or one time window per


customer.

• No compatibility constraints.

• No DOT rules.
Simplest Model: TSP

• Given a depot and a set of n customers, find a


route (or “tour”) starting and ending at the
depot, that visits each customer once and is of
minimum length.

• One vehicle.
• No capacities.
• Minimize distance.
• No time windows.
• No compatibility constraints.
• No DOT rules.
Symmetric and Asymmetric

Let cij be the cost (distance or time) to travel


from i to j.

If cij = cji for all customers, then the problem is


symmetric.
- Direction does not affect cost.

If cij  cji for some pair of customers, then the


problem is asymmetric.
- Direction does affect cost.
Vehicle Routing Problem -II

• Multiple Routes

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

• Improvement Heuristics

• Time Windows
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.
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.


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).
Sweep Algorithm

Suppose each vehicle capacity = 4 customers

depot

depot
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).
Nearest Neighbor Algorithm

Suppose each vehicle capacity = 4 customers

depot
First route

depot
Nearest Neighbor Algorithm

Suppose each vehicle capacity = 4 customers

Second route

depot

depot
Third route
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).
Cluster with Minimum Angle

Suppose each vehicle capacity = 4 customers

depot depot

Select 3 seeds Add customers with


minimum angle
Cluster with Minimum Angle

Suppose each vehicle capacity = 4 customers

depot

Add customers with


minimum angle
Cluster with Minimum Angle

Suppose each vehicle capacity = 4 customers

depot

Add customers with


minimum angle
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.
Improvement Heuristics

Cluster with Minimum Angle

depot depot

Starting routes “Optimized” routes


Time Windows

• Problems with time windows involve routing and


scheduling.

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

5,[8-10]
Customer
depot number
6,[9-12]
Start and end of
time window
(2 pm - 4 pm)
Routing Example with Time Windows

One hour travel time between any two customers.


Half hour delivery time at each customer.

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

5,[8-11]

depot
6,[9-12]
Nearest Insertion - No Time Windows

Insert nearest customer to route in best location.

3 3
1 2 1 2
4 4

5 5
depot depot
6 6
Nearest Insertion - No Time Windows

Insert nearest customer to route in best location.

3 3
1 2 1 2
4 4

5 5
depot depot
6 6
Nearest Insertion - No Time Windows

Insert nearest customer to route in best location.

3 3
1 2 1 2
4 4

5 5
depot depot
6 6
Nearest Insertion with Time
Windows
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 8:00 - 11:00


Arrive at 1: 9:00 - 12:00
3,[2-4] Leave 1: 9:30 - 12:30
1, [9-12] 2,[1-3]
4,[10-2]

5,[8-11]

depot
6,[9-12]
depot-1
Nearest Insertion with Time
Windows
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 10:30


Arrive at 1: 11:30
3,[2-4] Leave 1: 12:00
Arrive at 2: 1:00
1, [9-12] 2,[1-3]
Leave 2: 1:30
4,[10-2]

5,[8-11]

depot
6,[9-12]
depot-1-2
Nearest Insertion with Time
Windows
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 9:00


Arrive at 1: 10:00
3,[2-4] Leave 1: 10:30
Arrive at 4: 11:30
1, [9-12] 2,[1-3]
Leave 4: 12:00
4,[10-2] Arrive at 2: 1:00
Leave 2: 1:30
5,[8-11]

depot
6,[9-12]
depot-1-4-2
Nearest Insertion with Time
Windows - one option
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 8:00


Arrive at 1: 9:00
3,[2-4] Leave 1: 9:30
Arrive at 5: 10:30
1, [9-12] 2,[1-3]
Leave 5: 11:00
4,[10-2] Arrive at 4: 12:00
Leave 4: 12:30
5,[8-11] Arrive at 2: 1:30
Leave 2: 2:00
depot
6,[9-12]
depot-1-5-4-2
Nearest Insertion with Time
Windows - a better option
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 7:30


Arrive at 5: 8:30
3,[2-4] Leave 5: 9:00
Arrive at 4: 10:00
1, [9-12] 2,[1-3]
Leave 4: 10:30
4,[10-2] Arrive at 1: 11:30
Leave 1: 12:00
5,[8-11] Arrive at 2: 1:00
Leave 2: 1:30
depot
6,[9-12]
depot-5-4-1-2
Nearest Insertion with Time
Windows
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 7:30


Arrive at 5: 8:30
Leave 5: 9:00
3,[2-4] Arrive at 4: 10:00
Leave 4: 10:30
1, [9-12] 2,[1-3]
Arrive at 1: 11:30
4,[10-2] Leave 1: 12:00
Arrive at 2: 1:00
5,[8-11] Leave 2: 1:30
Arrive at 3: 2:30
depot Leave 3: 3:30
6,[9-12]

depot-5-4-1-2-3
Nearest Insertion with Time
Windows
One hour travel time between any two customers.
Half hour delivery time at each customer.

Leave depot: 7:00


Arrive at 5: 8:00
Leave 5: 8:30
3,[2-4] Arrive at 6: 9:30
Leave 6: 10:00
1, [9-12] 2,[1-3]
Arrive at 1: 11:00
4,[10-2] Leave 1: 11:30
Arrive at 4: 12:30
5,[8-11] Leave 4: 1:00
Arrive at 2: 2:00
depot Leave 2: 2:30
6,[9-12]
Arrive at 3: 3:30

depot-5-6-1-4-2-3
Routing with Time Windows

Route must be
built with both
time windows &
geography in
3,[2-4]
mind!
1, [9-12] 2,[1-3]
4,[10-2]

5,[8-11]

depot
6,[9-12]
Clustering and Time Windows

• Cluster customers based on location and time


window.
• Design routes for each cluster.

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

5,[8-11]

depot
6,[9-12]
Clustering and Time Windows

• Cluster customers based on location and time


window.
• Design routes for each cluster.

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

5,[8-11]

depot
6,[9-12]
ArcLogistics Route Solution Technique

ArcLogistics is cloud-based vehicle routing and scheduling


software that creates optimum routes and schedules
based on specific business operations including vehicle
capacities, driver specialties, street network restrictions,
and customer time windows.
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.
ArcLogistics Route Insertions

• Objective: Minimize weighted sum of:


– travel times (t),
– time window violations (v), and
– free (waiting) time (w).

r
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 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.
Improvement Heuristics

Intra-route
improvement
Inter-route
improvement

depot depot

Starting routes “Improved” routes


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?
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?
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?
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.
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.
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.
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.
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
Linking Locations to Road Network

• Other packages assume straight line travel from


nearest street intersection.

Some packages compares


these distances.