Sunteți pe pagina 1din 22

VEHICLE ROUTING PROBLEM

Readings: E&M 350-353

Topics:
VRP versus TSP
Solution methods
Decision support systems for VRP
Relationship between TSP and VRP
Vehicle routing problem (VRP) is similar to the Traveling salesman problem (TSP) but with more
constraints such as vehicle capacity. Consider a TSP problem:

Depot

Suppose that the vehicle has a capacity of 10 and each customer has an order size as shown
below, then the TSP solution is no longer feasible.

1
3

2
2
Depot

1
4

3
4

1
VRP

A simple method :

Use the TSP as usual

When exceeding the vehicle capacity,


go back to the depot

Start another tour with the nearest


customer as the first customer

Repeat b. and c. until all customers are


served.

2
2

Depot

Can we use only three tours to serve all


customers?

1
3

2
2

1
Depot

As a Decision Problem

Decisions

Assignment of orders to vehicles


The sequence of orders to be served

Constraints

Vehicle capacity (in terms of volume or weight normally)

Objectives

Minimizing mileages or time


Considerations

Known demand
Delivery or pick-up

2
VRP

Solution Strategy
Tour construction heuristics
Insertion methods (e.g. nearest insertion, min cost insertion)
Savings methods (e.g. Clarke-Wright savings)
Generalized assignment methods (e.g Fisher-Jaikumar method)
Tour improvement
Intra-route improvement methods (e.g. 2-Opt, 3-Opt)
Inter-route improvement methods (e.g. Relocate)

Tour construction method 1: Clarke-Wright savings method

Given
1 depot
4 customers with known demand
Vehicle capacity (100)
Costs for traveling between customers

35
3

40

2
45

52

43
57

60

29
25

72

Demand for
customer 5

43

45

43
1
Depot

Basic Steps

Identify the distance matrix


Identify the savings matrix
Combine routes

3
VRP

4
VRP

5
VRP

s(2, 3) = 25 + 43 29 = 39
s(2, 4) = c(1, 2) + c(4, 1) c(2, 4)
= 25 + 57 34 = 48

25

39

48

25

43

29

48

57

34

52

43

43

72

45

s(2, 5) = c(1, 2) + c(5, 1) c(2, 5)


= 25 + 43 43 = 25
s(3, 4) = c(1, 3) + c(4, 1) c(3, 4)
= 43 + 57 52 = 48

Begin combining tours: starting with the highest savings and (a) the
combined tour cannot exceed vehicle capacity, (b) insertion cannot be
in the interior of a tour.
1

25 -

43 29 -

57 34 52 -

43 43 72 45 -

4
2
4

39 48 25
5

48 14
55

Demand (5) = 60
Demand (4) = 35
Vehicle capacity = 100
Decision: combine the tour

4
1
Depo

6
VRP

Next highest savings:

Demand (2) = 40
Demand (4+5) = 95
Vehicle capacity = 100
Decision: cannot combine the

25 -

43 29 -

57 34 52 -

43 43 72 45 -

2
45

39 48 25
48 14
55

34

25

5
4

43
1
Depot

7
VRP

All nodes are visited once and the total cost is 242.
How to speed up the Clarke-Wright Savings Method?
We can use Heap to store the savings (from the largest to the smallest). The use of Heap can speed
up the operations.

Tour construction method 2: Generalized assignment method


(also called Fisher Jaikumar Method)

Assign seed points for each route


Evaluate insertion cost for each customer
Assign customers to routes

Parameters
di
uk

: demand of customer i
: capacity of vehicle k

8
VRP

Decision variables

1 if customer i is assigned to route k


yik =
0 otherwise
1 if i is visited followed by visiting j on route k
xijk =
0 otherwise
Define:
N(yk) = all nodes on route k
f(yk) = the cost of route k
Our objective is to minimize the route cost while satisfying the demand. Therefore, we can write
the problem as follows:

Example

y41 = 1

Vehicle 1

y51 = 0

N ( y1 ) = {1, 3, 4}

1
2

0
5
6

min

Vehicle 2

y42 = 0
y52 = 1

N ( y2 ) = {2, 5, 6}

f ( yk )
k

subject to

di yik
i

yik
k

yik

uk

k i = 0
=
1 i = 1,..., n
{0,1}

The cost of route f (yk) is defined as follows:


9
VRP

f ( yk ) = min
subject to

cij xijk
ij

xijk

yik

xijk

yik

xijk

iQ jQ

j = 0,..., n

1, Q N ( yk )

A big problem: f (yk) is a complex, nonlinear function.


Solution idea: Approximate f (yk) by some linear function:
f (yk) ~

cik yik
i

The coefficient, cik , represents the approximated cost of putting customer i on route k.
How do we get cik ?
Idea 1: cheapest insertion cost
Idea 2: use the concept of opportunity cost
Steps of the generalized assignment
Step 1: Assign a seed to each vehicle (or route) where the seeds are farthest away from each other
(Suppose that we have 3 vehicles)

10
VRP

Step 2: Evaluate the cost of inserting the customers into the existing routes.

Option 1: Approximate by the cheapest insertion cost

a
Customer 1

Best choice for customer 1: c


Best choice for customer 2: b
Best choice for customer 3: b
Second best for customer 3: a
Total cost: 38

cost = 7
cost = 12
not available
cost = 19

19

22

13

14

13

Customer 2

12

Customer 3

Option 2: Approximate by Opportunity cost or Regret


Regret = Cost for second best choice cost for the best choice
Customer with the highest opportunity cost should be inserted first

Opportunity cost for customer 1: 2


Opportunity cost for customer 2: 1
Opportunity cost for customer 3: 6

Customer 1

9
7

19

22

14

13

13
Customer 3

12

Customer 2

Opportunity cost for customer 1: 2


Opportunity cost for customer 2: 1
customer 3 to b: 13
customer 1 to c: 7
customer 2 to a: 14
Total: 34

11
VRP

Step 3: Rank customers from highest to lowest regret.

Example: Regret (3) > Regret (2)


Customer 2

From 3 to c route: 11
From 3 to b route: 17
From 3 to a route: 18
Regret(3) = 6

From 2 to c route: 10
From 2 to a route: 11
From 2 to b route: 12

Customer 3

Regret(2) = 1

b
Step 4: Insert the customers according to the rank of regrets one at a time. Notice that the regrets
may need to be updated.

Tour improvement Methods


There are general types of methods:
1. Intra-route improvement (changing the sequence of customers within a route)
Examples:

2-Opt

3-Opt
2. Inter-route improvement

Exchanging customers between routes


Exchanging segments of routes between routes

Example of Intra-route improvement: 2-opt algorithm


Do a swap of arc pairs in a route if it can reduce the cost (or time). Below we consider a case
where customers may impose delivery time-windows.

12
VRP

2-opt

Note: the indices i and j are in the order of the nodes being visited in a given tour. For simplicity,
we represent the route as a chain and ignore the physical shape of the route

2-opt swapping illustration

2-opt

i+1

i+1

j+1

j+1

13
VRP

o Flow chart:
For the node pairs
of i, j, consider swapping?
Y
d(i,j)+d(i+1, j+1)<
d(i, i+1) +d(j, j+1) ?

Y
After the swap, is the
resulting tour feasible?

Y
Swap the arcs (Note that the
arcs from i+1 to j are reversed

Stop?

Y
Return new solution

We can continue the swapping until the two cost savings of two consecutive swaps is smaller than
some small values or the number of swapping has reached a pre-defined maximum number of
swaps. In implementing 2-Opt algorithm, there are several possible ways to select which pairs of
arcs to be considered for swapping.

Select the pair of arcs with the best cost savings and then make swap;

Select several pair of arcs with the best cost savings and swap the best pair. From the
second swap on, this method will check the feasibility before making it since the route has
been changed after the first swap.
14

VRP

Randomly consider a pair of arcs and makes swap if it is feasible and can produce cost
savings;

Traverse the route from the starting point and make the swap once an eligible pair of arcs
(feasible and cost savings) is found.

Example of Inter-route improvement: Relocate


Consider the swapping between two existing routes. One way is to relocate a node in a route
(say route B) to another route (say route A)

i-1

Route A

i+1

j+1
Route B

Depot

We need to choose the route from which one node will be removed (route B) and the route to
which the node will be inserted (route A). Then, we can follow the procedure below:

15
VRP

Expanding route A,
Shrinking route B

For each node i in B

Y
Find a new feasible position for
i in Route A, say between j and j+1

Y
d(j,i)+d(i, j+1) +d(i-1, i+1)<
d(i, i+1) +d(j, j+1) +d(i-1, i)?

Y
Insert i between (j, j+1)
& Connect i-1, i+1

Finish expanding/shrinking

Return

In implementing the relocate algorithm, we have several options:

For each node in the shrinking route, find the first position in the expanding route after
which the node can be inserted and the relocation of the node results in cost saving.

Similar to the above, except that for each node in the shrinking route, it will find the
position in the expanding route that the relocation will result in the largest saving.

For each node in the shrinking route, find the best position as well as the best expanding
route

Other Implementation issues


Time window constraints
Each customer has a specified time period during which the vehicle can visit

16
VRP

Backhaul (pickup and delivery)


Not just delivery goods from the depot, but also pick up goods from customers
Multiple depots
Vehicles can be coming from different depots
Split orders
May have more than one delivery to a customer

The case of a chemical product manufacturer:


orders
Customer
service

Production
unit

Warehouse

Information
system

Fleet unit

delivery

Sites
Multiple factories in Pearl River Delta
Supply petrol chemical products to customers in PRD

17
VRP

Production
Just-in-time production
Distribution
20 - 50 trucks per factory
Order cut-off at 4 pm
More than 1 trip per vehicle
Divide region in zones and one route per zone
Process
Receive an order
Estimate the order finishing time
Sort the orders to be finished on tomorrow
Estimate the delivery schedules
According to the delivery schedules, re-estimate the production schedules
When the orders are ready, ask warehouse people prepare for the loading
Ask fleet unit to send trucks to warehouse for loading
Operation Issues
Information is not synchronized
Paper work between units
Spend 3 hours in determining initial delivery schedules
Low truck utilization
Difficult to entertain customers request on exact/approximate delivery time
Urgent orders (some trucks are reserved to handle urgent order)

DECISION SUPPORT SYSTEMS FOR VRP


What is a decision support system?
What are the differences between Databases, Enterprise systems, Decision support systems?

Database
Organized storage of data
Minimize data redundancy and inconsistency
Data retrieval, search, and sort
Enterprise system
Minimize inconsistency across databases
Real-time data
Integrating databases
Decision support system
A system to support decision making
Extract data and process data intelligently

18
VRP

The Components of DSS:


1. Database
2. Model-base
3. User interface

Decision support system development

Analyzing the needs


o Focus on causes, not symptoms
o What will be the reasonable expectation?

Data Development
o Data administration is a critical requirement for long-term success
o DSS requires their own database to produce effective results
o Is historical data available? Is the data telling the truth?

Model-base
o Model contents should be consistent with its goals: strategic, tactical, or
operational?
o What class of models do you want? Descriptive? Prescriptive?

Performance how to measure?

What assumptions do you make? Are we assuming:


o Perfect data
o Dispatchers follow instruction exactly
o Drivers follow instruction exactly
o Shippers with perfectly predictable demands
o Personnel from different department have the same goal

19
VRP

Source: P.72, Mazza, Faircloug, Melton, de Pablo, Scheffer, Stevens, Software Engineering
Standards, Prentice Hall

Major phases in DSS development (and examples of activities)


User Requirement Definition
Capture, determine, specify and verify user requirements

Software Requirement Definition


Construct logical model
Specify functional, performance, documentation, acceptance testing requirements, etc.

Architectural Design
Decompose software into components
Define data input and output requirement, data structure, etc.
Select programming languages

Detailed Design and Production


Detailed design of lower-level components
Coding
Integrating components
Testing

Transfer
Installation
Acceptance tests

Operations and Maintenance


Final acceptance
20
VRP

Data Preparation for DSS:

Customer
independent

Customer
dependent

Static

Dynamic

Raw location data:


Road, speed limit, tolls, major
intersections, landmarks, etc.
Processed data:
Distances, costs, times, etc. between
points of interests (via shortest path
methods on raw location data)
Locations
Trucks Details (e.g. capacity, loading
and unloading time, running cost)
Drivers Details (e.g. salary, overtime)
Products Details (e.g. size, weight,
price)

Travel flow pattern


Road restriction

Demand data:
Orders Details (e.g. daily
demand, amount)
Items Details (e.g. product to be
ordered, quantity)

Processing on preliminary static data:


Use shortest path engine to compute the distance, cost, or time, etc. between customers or between
depot and customers.

21
VRP

VRP Engine for the DSS


A combination of Saving Heuristics, Generalized assignment (Fisher-Jaikumar method), tour
improvement (2-Opt, Or-Opt), and different insertion methods.

Resulting handling and tools for analysis

Visualizing results
o Gantt charts
o Static route display
o Animation
Allow users to make changes
Measure performance
Compare scenarios
What-if analysis

Typical decision support

What are some good suggested solutions?


What is the impact of changing the sequence of orders being served?
What orders should be outsourced?
Can an urgent pickup order be accepted? By what vehicle? At what time?
What are the costs if different numbers of vehicles are used?

22
VRP

S-ar putea să vă placă și