Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Supply chain management

PGE-M5-OPS-602-E-L-BOD-M1

Operational Distribution
(continued)
Yann BOUCHERY

Associate Professor in Operations Management


& Logistics
The shortest path problem
Example: What is the shortest path (in distance)?

4 KM

3 KM

4 KM 2 KM 2
4 2 KM
3 KM 3

3 KM

3KM 2 KM 6 KM

6 5

4 KM 2 KM

© Yann Bouchery, KEDGE Business School 2


The shortest path problem

1) Directed graph:
1 1
4
3 4
3 2
4
4 2 2 2 4 3 3 2 2
3
3

3 3 3
3 2 6 2 6
6 5
6 5
4 2

7 4 2
7

© Yann Bouchery, KEDGE Business School 3


The shortest path problem

2) Shortest path:
1 1
3 4 3 4
2 2
4 3 2 2 4 3 3 2 2
3
3 3 3 3
2 6 2 6
6 5 6 5
4 2 4 2
7 7

© Yann Bouchery, KEDGE Business School 4


The shortest path problem

3) Is this a difficult problem to solve if the graph


becomes large? Why?

The shortest path problem can be solved


by dynamic programming…

© Yann Bouchery, KEDGE Business School 5


Introduction to Dynamic Programming (DP)

Calculate for each node i the length of the


shortest path from 1 to i (by checking every 1
possible solutions) 3 4
2

Let dmin(i) be this value: 4 3 3 2 2

dmin(i) = min{dmin(up(i)) + dup(i)i} 3 3


2 6
with: 6 5
up(i) the node situated upstream node i 4 2
7
dup(i)i the distance from up(i) to i.

© Yann Bouchery, KEDGE Business School 6


Introduction to Dynamic Programming (DP)

dmin(1) = 0
1
dmin(2) = dmin(1)+ d12= 4 3 4
2
dmin(3) = min{dmin(2)+ d23, dmin(1)+ d13}= min{6,2}=2 3 2 2
4 3
dmin(4) = min{dmin(1)+ d14, dmin(3)+ d34} =min{3,5}=3 3
3 2 6
dmin(5) = min{dmin(2)+ d25, dmin(3)+ d35} =min{7,8}=7
6 5
dmin(6) = min{dmin(3)+ d36, dmin(4)+ d46} =min{4,6}=4
4 2
dmin(7) = min{dmin(5)+ d57, dmin(6)+ d67} =min{9,8}=8 7

© Yann Bouchery, KEDGE Business School 7


Introduction to Dynamic Programming (DP)

dmin(1) = 0
1
dmin(2) = dmin(1)+ d12= 4 3 4
2
dmin(3) = min{dmin(2)+ d23, dmin(1)+ d13}= min{6,2}=2 3 2 2
4 3
dmin(4) = min{dmin(1)+ d14, dmin(3)+ d34} =min{3,5}=3 3
3 2 6
dmin(5) = min{dmin(2)+ d25, dmin(3)+ d35} =min{7,8}=7
6 5
dmin(6) = min{dmin(3)+ d36, dmin(4)+ d46} =min{4,6}=4
4 2
dmin(7) = min{dmin(5)+ d57, dmin(6)+ d67} =min{9,8}=8 7

Optimal solution: 1-3-6-7=8km


© Yann Bouchery, KEDGE Business School 8
The traveling salesman problem
Objective: Find the optimal tour to visit a list of locations with one vehicle.

© Yann Bouchery, KEDGE Business School 9


The traveling salesman problem
An example: How many options if we need to connect 5 locations ?
(including the depot and assuming a complete indirected graph)

4
5
= 4*3*2*1/2
1
3
= 12 solutions

© Yann Bouchery, KEDGE Business School 10


The traveling salesman problem
Number of locations Number of options
3 1
4 3
5 12
6 60
10 181 440
15 43 589 145 600

The number of options grows fast!!

© Yann Bouchery, KEDGE Business School 11


The traveling salesman problem
An example with 5 locations (including the depot)

Traveling distance between locations


1 2 3 4 5 1 4
1 0 10 5 9 4 9 10 5
10
5
2 10 0 6 9 10
5
3 5 6 0 3 1 2
9
1 4
4 9 9 3 0 5 6
3
3
5 4 10 1 5 0

© Yann Bouchery, KEDGE Business School 12


The traveling salesman problem
An example with 5 locations (including the depot)
Solution 1 : 1 – 2 – 3 – 4 – 5 – 1  28
Solution 2 : 1 – 2 – 3 – 5 – 4 – 1  31
Solution 3 : 1 – 2 – 4 – 5 – 3 – 1  30
Solution 4 : 1 – 2 – 4 – 3 – 5 – 1  27
Solution 5 : 1 – 2 – 5 – 3 – 4 – 1  33
Solution 6 : 1 – 2 – 5 – 4 – 3 – 1  33
Solution 7 : 1 – 3 – 2 – 4 – 5 – 1  29
Solution 8 : 1 – 3 – 2 – 5 – 4 – 1  35
Solution 9 : 1 – 3 – 4 – 2 – 5 – 1  31
Solution 10 : 1 – 3 – 5 – 2 – 4 – 1  34
Solution 11 : 1 – 4 – 2 – 3 – 5 – 1  29
Solution 12 : 1 – 4 – 3 – 2 – 5 – 1  32

Optimal solution: 1-2-4-3-5-1=1-5-3-4-2-1


© Yann Bouchery, KEDGE Business School 13
The traveling salesman problem
How to make this more realistic?

TSP in a directed graph (not necessarily complete)

TSP with capacity constraints

TSP with time windows

© Yann Bouchery, KEDGE Business School 14


Thank you for
your attention…
Yann BOUCHERY
Associate Professor in OM & Logistics
KEDGE BUSINESS SCHOOL
Office 1524, 680 cours de la Libération
33405 Talence Cedex - France
yann.bouchery@kedgebs.com
Tel.: +33 (0) 5 56 84 55 37

You might also like