22
Logistics Routing Plans: Max Flow Problem ives and Agenda: xamples for flow of materials over limited capacity inding maximum flows: Ford-Fulkerson Method

Logistics Routing Plans: Max Flow Problem Objectives and Agenda: 1. Examples for flow of materials over limited capacity channels 2. Finding maximum flows:

Embed Size (px)

Citation preview

Logistics Routing Plans: Max Flow Problem

Objectives and Agenda:

1. Examples for flow of materials over limited capacity channels

2. Finding maximum flows: Ford-Fulkerson Method

Logistics supply problem: Example 1

What is the maximum power we can supply to Wan Chai for a Light-n-Sound Show?

Lamma

Power Station

WanC

hai

NorthPoint

RepulseBay

Aberdeen

PokFuLam

WesternCentral

HappyValley

30

50

40

2020

2020

10 20

5

40

15 15

4025

1520

Legend:Node: Sub-stationEdge: Power lineWeight: Line capacity

Logistics supply problem: Example 2

Detroit

Kansas City

Minneapolis

San Francisco

Boise

Phoenix

8

14

146

12

10

10

7

17

6

Detroit

Kansas City

Minneapolis

San Francisco

Boise

Phoenix

8

14

146

12

10

10

7

17

6

Legend:nodes: train line junctions;edges: rail line;weights: max no. of compartments/day

Maximum number of compartments per day from Detroit SF ?

Maximum Flow Problem: definitions

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

SOURCE:Node with net outflow:Production point

SINK:Node with net inflow;Consumption point

CAPACITY:Maximum flowon an edge

Efficient method to solve such problems: Ford-Fulkerson Method

Ford-Fulkerson Method..

Three fundamental concepts:

1. Flow cancellation

2. Augmentation flow

3. Residual network

Ford-Fulkerson Method: Flow Cancellation

a b

14

6

Net flows:

5/14

3/6a b

2/14

6a b

Additional 7 units from b a ?!14

5/6

a b

Network

Flow: 5 units, a b, 3 units b a

Flow Cancellation: Compute the NET FLOW between a pair of nodes

Ford-Fulkerson Method: Augmenting Path

Augmenting Path: any path from source sink with positive capacity

Examples

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

Path Capacity

<D, M, B, S> 8

<D, M, K, P, S> 6

Ford-Fulkerson Method: Residual network

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

Given a Network G, with flow, | f |, on path p

Flow cancellation

residualnetwork

Ford-Fulkerson Method..

Initialize the network: zero flow

any augmenting path pin network ?

Apply maximum flow allowed on p

Compute residual network

ResidualnetworkCarries

Max FlowYES

NO

Ford-Fulkerson Method: Initialize

Step 1. Add 0-capacity links to pair ‘one-way’ edges

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

Step 1

Ford-Fulkerson Method: Find an augmentation path

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

8

14

146

12

10

10

7

17

6

0

0

0

0

00

0

0

D

M

K

S

B

P

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

Flow, f = 6 units

Step 2. Find a positive flow from Source Sink

Ford-Fulkerson Method...

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

6/8

14

6/146

12

10

6/10

7

17

6/6

0

0

0

0

00

0

0

D

M

K

S

B

P

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

Step 3. Update the residual network due to flow f

Current total flow: 6

Ford-Fulkerson Method….

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

2

14

812

12

10

4

7

17

0

0

6

0

0

06

0

6

D

M

K

S

B

P

Augmentation path: <D, M, B, S>Max flow: 2

Current total flow: 6+2 Residual network

0

14

812

10

4

7

15

0

2

6

0

08

0

6

D

M

K

S

B

P

14

812

10

10

4

7

0

6

0

0

2

0

6

Ford-Fulkerson Method…..

0

14

812

10

4

7

15

0

2

6

0

08

0

6

D

M

K

S

B

P

14

812

10

10

4

7

0

6

0

0

2

0

6

0

182

10

4

7

5

0

12

6

0

08

10

6

D

M

K

S

B

P

4

0

107

0

0

12

Augmentation path: <D, K, M, B, S>Max flow: 10

Current total flow: 6+2+10 Residual network

Ford-Fulkerson Method……

0

182

10

4

7

5

0

12

6

0

08

10

6

D

M

K

S

B

P

4

0

107

0

0

12

0

182

10

0

1

0

16

6

08

14

10

D

M

K

S

B

P

0

0

1034

0

12

Augmentation path: <D, K, P, B, S>Max flow: 4

Current total flow: 6+2+10+4 Residual network

No moreAugmentation paths

DONE

Ford-Fulkerson Method: Proof

Network G, flow f1 residual network Gf1

Network Gf1, flow f2 residual network Gf1, f2

Network G, flow (f1 + f2) residual network Gf1, f2

=> We can solve the problem in stages!

Property 1: We can add augmentation flows

Ford-Fulkerson Method: Proof..

Property 2: Every source-containing bag has same net outflow

D

M

K

S

B

P

6/8

6/14

0/146/6

12/12

6/10

6/10

0/7

6/17

6/6

Example:Compare net flow out ofblue bag and red bag

Network G, flow f, amount: | f |

Each source-containing bag, net outflow = |f|

Why ?

Ford-Fulkerson Method: Proof...

Definition: Outflow capacity of a bag = total capacity of outflows

D

M

K

S

B

P

6/8

6/14

0/146/6

12/12

6/10

6/10

0/7

6/17

6/6

Examples:Outflow capacity of red bag = 8+6+10 = 24Outflow capacity of blue bag = 12+10 = 22

Ford-Fulkerson Method: Proof….

Suppose, at termination, total flow in network = f*

Using f*, we have no augmentation path from source sink

OUT-OF-BAG:Set of nodes with no augmentationpath from source

IN-BAG:Set of nodes with augmentationpath from source

Residual network, Gf*

Source

Sink

0

0

0

0

=> Existence of | f | > |f*| impossible!

Concluding remarks

(a)How to find augmenting paths ?

-- Need to search all possibilities on the network

(b) Classical terminology: The Max-flow Min-cut theorem

(c) Applications:

(i) Transportation Logistics (ships, airlines, trains)

(ii) Design of supply networks (water, sewage, chemical plant, food processing, roads)

next topic: Project management using CPM/PERT

Ford-Fulkerson Method..

Ford-Fulkerson Method..