Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Chapter 7 - Formulating Network Problems

Uploaded by

zqweo23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Chapter 7 - Formulating Network Problems

Uploaded by

zqweo23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Chapter 7

Formulating and Solving Network Flow


Problems
Prof. Hai Yang
Department of Civil and Environmental Engineering
HKUST

1
Outline

• Introduction to Network Flow Models

• Shortest Path Problem


– LP Formulation
– Dijkstra’s Algorithm
– Directed Arcs Example

• Maximum Flow Problem


– LP Formulation
– Maximum Flow Algorithm

• Minimum Spanning Tree Problem


– Minimum Spanning Tree Algorithm

• Summary

2
Network Flow Models

• A lot of real-life problems can be solved using network flow models.


– Minimum cost flow problem
– Shortest path problem The most fundamental
– Maximum flow problem
– Minimum spanning tree problem

c: arc cost
u: arc capacity –3
9 6
3 2
2
c12, u12 3
7 10
3 8 -1
+1 4
1
100,10
2
50,3
4 –7 1 5
8 5
6 7
7
+10 4
5 3 5 4
5

3
Minimum Cost Flow Problem

• The most fundamental model of all network flow problems


• 𝑥𝑖𝑗 = amount of flow from node i to node j
• 𝑢𝑖𝑗 (𝑙𝑖𝑗 ) = upper (lower) capacity of arc (i,j)
• 𝑐𝑖𝑗 = unit flow cost from node i to node j
• 𝑓𝑖 = net flow at node i
𝑓𝑖 > 0 for supply nodes (sources)
𝑓𝑖 = 0 for intermediate (transhipment) nodes
𝑓𝑖 < 0 for demand nodes (sinks)

What is the least costly shipment


arrangement through the network to
satisfy the demands at sinks from
available suppliers at sources ?

4
Minimum Cost Flow Problem:
LP Formulation

• The LP formulation in terms of the amount of flow from node i to


node j, 𝑥𝑖𝑗 , can be written as:

Minimize 𝑍 = σ𝑖 σ𝑗 𝑐𝑖𝑗 𝑥𝑖𝑗


Subject to: σ𝑗 𝑥𝑖𝑗 − σ𝑘 𝑥𝑘𝑖 = 𝑓𝑖 for all nodes i
(Outflow – Inflow = Net Flow)
𝑥𝑖𝑗 ≤ 𝑢𝑖𝑗 for all i and j
(Arc capacities not exceeded)
𝑥𝑖𝑗 ≥ 𝑙𝑖𝑗 for all i and j
(Meet the lower bound, if any, of each arc)
𝑥𝑖𝑗 ≥ 0 for all i and j

5
Minimum Cost Flow Problem:
LP Formulation Example
Min 𝑍 = 3𝑥12 + 4𝑥13 + 1𝑥14 + 5𝑥23 + 6𝑥25 + 1𝑥34 + 2𝑥35 + 2𝑥46 + 4𝑥56

subject to (Outflow – Inflow = Net Flow)

𝑥12 + 𝑥13 + 𝑥14 = 100 (Node 1 - Supply)


𝑥23 + 𝑥25 − 𝑥12 = 200 (Node 2 - Supply)
𝑥34 + 𝑥35 − 𝑥13 − 𝑥23 = 0 (Node 3 - Intermediate)
𝑥46 − 𝑥14 − 𝑥34 = −100 (Node 4 - Demand)
𝑥56 − 𝑥25 − 𝑥35 = −80 (Node 5 - Demand) Lower &
upper bound
−𝑥46 − 𝑥56 = −120 (Node 6 - Demand)

6
Minimum Cost Flow Problem
LP Formulation Example

Min 𝑍 = 3𝑥12 + 4𝑥13 + 1𝑥14 + 5𝑥23 + 6𝑥25 + 1𝑥34 + 2𝑥35 + 2𝑥46 + 4𝑥56

Subject to (Arc capacities)


50 ≤ 𝑥14 ≤ 80 (Arc 14)
70 ≤ 𝑥34 ≤ 120 (Arc 34)
100 ≤ 𝑥56 ≤ 120 (Arc 56)
𝑥𝑖𝑗 ≥ 0 for all arcs (i,j)

7
Minimum Cost Flow Problem:
Application Examples

• Distribution of a product from manufacturing plants to


warehouses or from warehouses to retailers.

• The flow of components and sub-assemblies through various


machining stations in a production line.

• Routing of automobiles through an urban street network.

• Sub-problem (All-or-Nothing) assignment in road traffic


assignment problem.

• Design of an offshore natural gas pipeline network connecting


well heads in the Gulf of Mexico to an inshore delivery point
with the minimum cost of constructing the pipeline.

• Determination of the maximum monthly capacity of a coal


slurry pipeline network joining coal mines and power plants.
8
Formulating and Solving Network
Flow Problems

Shortest Path Problems

9
Shortest Path Problem

• The simplest of all network flow problems.

• Goal: To find the shortest (least costly) path from a specific


origin node to a destination node.

• The shortest path problem can be formulated as a minimum


cost flow problem with one unit of supply at the origin node
and one unit of demand at the destination node.

9 6 2
3 2
7 10
3 8 -1 f1 = +1, f8 = –1, and
+1 4
1 5 fi = 0 for all other nodes
8 5
6 7
4
7 All arc capacities uij = 1
3 5 4
5
10
Shortest Path Problem Example:
LP Formulation

Both directions
Min 𝑍 = 3𝑥12 + 3𝑥21 + 4𝑥13 + 4𝑥31 + 5𝑥23 + 5𝑥32 + ⋯ + 5𝑥78 + 5𝑥87

Subject to (Outflow – Inflow = Net Flow)


𝑥12 + 𝑥13 − 𝑥21 − 𝑥31 = 1 (Node 1 - Supply)
𝑥21 + 𝑥23 + 𝑥24 + 𝑥26 − 𝑥12 − 𝑥32 − 𝑥42 − 𝑥62 = 0 (Node 2 - Intermediate)
𝑥31 + 𝑥32 + 𝑥34 + 𝑥35 − 𝑥13 − 𝑥23 − 𝑥43 − 𝑥53 = 0 (Node 3 - Intermediate)

𝑥84 + 𝑥86 + 𝑥87 − 𝑥48 − 𝑥68 − 𝑥78 = −1 (Node 8 - Demand)

𝑥𝑖𝑗 ≥ 0 for all i and j 9 6 2


3 2
7 10
3 8 -1
+1 4
1 5
8 5
6 7
7
4
3 5 4
5 11
Shortest Path Problem Example:
LP Formulation

Objective Value = 13
0 6
𝑥𝑖𝑗 0
1 2
1 0
1 8 -1
+1 4
1 0
0 0
0 0
7
0
3 5 0 9 6
0 2
3 2
7 10
3 8 -1
+1 4
1 5
8 5
6 7
7
𝑐𝑖𝑗 4
3 5 4
5

12
Shortest Path Problem Special Restricted Case
Case 1: Unavailable Arcs

• Finding the shortest path which does not go through


some arcs, e.g. arc (4,8)
→ Solution 1: Assign a high cost or length to those unavailable
arcs (e.g. arc (4,8))
→ Solution 2: Assign the capacity of those arcs to 0 and impose
capacity constraints
9 6 2
3 2
7 10
100 8 -1
+1 4
1 5
8 5
6 7
7
4
3 5 4
5
13
Shortest Path Problem Special Restricted Case
Case 2: Unavailable Nodes

• Finding the shortest path which does not go through some


nodes, e.g. Node 6

→ Solution 1: Assign a high cost or length to the arcs incident


to the unavailable nodes (Node 6)

→ Solution 2: Assign the capacity of the arcs incident to those


nodes to 0 and impose capacity constraints.

50 6
2 50
3 7 50 c26=50
3 8 -1
+1 1 5
4 c46=50
8 c86=50
7 5
6
7
4
3 5 4 Undirected arcs
5 14
Shortest Path Problem Special Restricted Case
Case 3: Compulsory Arcs

• Finding the shortest path which does go through an arc, e.g. arc
(4,7) or (7,4)
→ Does Not Work: Assign a zero cost to the compulsory arc (e.g. arc
(4,7))

9 6
2 2
3 10
7 3 8 -1
+1 4
1 5
8 5
6 0
7
4
3 5 4
5 Cost of 1-2-4-7-8 = 15
Cost of 1-2-4-8 = 13 (Optimal)

15
Shortest Path Problem Special Restricted Case
Case 3: Compulsory Arcs (Cont.)
• Finding the shortest path which does go through an arc, e.g. arc (4,7)
→ Solution:
(1) Find the shortest path between nodes 1-4 and 7-8: Cost = 22
(2) Find the shortest path between nodes 1-7 and 4-8: Cost = 23
(3) Take the smaller one, i.e. 1-2-4-7-8

9 6
2 2
3 10
7
3 8 -1
+1 4
1 5
8 5
6 7
7
4
3 5 4
5 16
Shortest Path Problem: Dijkstra’s Algorithm

• This algorithm finds the shortest path from source nodes to all other
nodes in the network.

• It is implemented by labeling nodes in the network.

• Label for node j is written as


𝑑 𝑗 , 𝑖 = [𝑑 𝑖 + 𝑐 𝑖𝑗 , 𝑖]

where i is the node immediately preceding j on the shortest path and d(j)
indicates the length of the current shortest path from s to j.

17
Labels

2
(3) (2)

(7) Total Node


1 4 5 Node (j) impedance to preceding j
(4) node (j)
(4)
3 1 0 -
2 3 1
3 4 1
2 4 5 2
5 12 4
1 4 5

18
Shortest Path Problem: Dijkstra’s Algorithm

• Step 1: Label node s with the permanent label [0,–]. Label every
node i connected to node s with a temporary label [c(s,i),s]. Assign
the label [∞, –] to all other nodes.

• Step 2: Select the node with the smallest temporary label, say node
i, and make it permanent.

• Step 3: For all node j connected to i by arcs that do not have


permanent labels, compare the current temporary distance label d(j)
with d(i)+c(i,j). If d(i)+c(i,j) < d(j), give a temporary label to node j
with [d(i)+c(i,j),i].

• Step 4: If all nodes have permanent labels, STOP. Otherwise, Go to


Step 2.

19
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Consider a city with the following road network.

• Each node represents a road junction. Each road section has a different
length, as shown in the network diagram.

• Goal: To find the shortest path from node s to every other node.

6
A
3
C
4 2
s 1 E

3 2
B D
3
20
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 1: Label node s with the permanent label [0,–]. Label every node i
connected to node s with a temporary label [c(s,i),s]. Assign the label
[∞, –] to all other nodes.

Initialization 6 [6,s]
[4,s]
A
3
C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
Permanent label with * 3
[3,s] [∞, –]

Preceding node is Node s


21
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.

Iteration 1 6 [4,s] [6,s]


A
3
C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
3
[3,s]* [∞, –]
The smallest
temporary label
Permanent label with *
22
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: If not all nodes have permanent labels, Go to Step 2.

6 [4,s] [6,s]
3
Iteration 1 A C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
3 The node connected
[3,s]* [6, B] to Node B and with
temporary label
3+3=6 23
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.

The smallest Permanent label with *


temporary label

6 [4,s]* [6,s]
Iteration 2 3
A C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
3
[3,s]* [6, B]
24
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: Go to Step 2.
4+3=7>6
Keep the old label

Iteration 2
6 [4,s]* [6,s]
A
3
C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
3
[3,s]* [5, A] [6, B]
4+1=5<6 25
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.

6 [4,s]* [6,s]
Iteration 3
A
3
C
4 2
[0,–]* s 1 E [∞, –]
3 2
B D
3 Permanent label with *
[3,s]* [5, A]*

The smallest
temporary label
26
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: Go to Step 2.

6 [4,s]* [6,s]
Iteration 3 3
A C
4 2
[0,–]* s 1 E [7, D]
3 2
B D 5+2=7
3
[3,s]* [5, A]*
27
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.

The smallest
temporary label

6 [4,s]* [6,s]*
Iteration 4 3
A C
4 2
[0,–]* s 1 E [7, D]
3 2
B D
3
[3,s]* [5, A]*
28
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: Go to Step 2.

6 [4,s]* [6,s]*
Iteration 4 A
3
C
4 2
[0,–]* s 1 E [7, D]
3 2
B D 6+2=8>7
3 Keep old label
[3,s]* [5, A]*
29
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.
• Step 3: Check the label for all node j connected to i by arcs that do
not have permanent labels.
• Step 4: If all nodes have permanent labels, STOP. Otherwise, Go to
Step 2.

6 [4,s]* [6,s]*
Iteration 5 A
3
C
4 2
[0,–]* s 1 E [7, D]*
3 2
B D
3
[3,s]* [5, A]* 30
Shortest Path Problem – Dijkstra’s Algorithm
Example 1: Travelling in a City

• Optimal Solution:

6 [4,s]* [6,s]*
A
3
C
4 2
[0,–]* s 1 E [7, D]*
3 2
B D
3
[3,s]* [5,A]*
Skim tree for node s

31
Iteration s → A B C D E Table format
4 3 6 ∞ ∞
Initial
s s s - -

4 3 6 6 ∞
1 B
s s s B -

4 3 6 5 ∞
2 A
s s s A -

4 3 6 5 7 Distance label
3 D
s s s A D

4 3 6 5 7
4 C
s s s A D Predecessor (preceding
node) label
4 3 6 5 7
5 E
s s s A D

6
The node made permanent Red text cell s : label being checked
in current iteration 3
Yellow cell s : permanent label
Each iteration has two steps:
• Make the node with the smallest temporary label permanent
• Update temporary labels of nodes connected to the (new) permanent node 32
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• Consider a city with the following road network.
• Each node represents a road junction. Each road section has a
different length, as shown in the network diagram.
• Goal: To find the shortest path from node s to every other node.

A 15
C
100 20 55
10
30 60
s B D

33
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads

• Step 1: Label node s with the permanent label [0,–]. Label every
node i connected to node s with a temporary label [c(s,i),s]. Assign
the label [∞, –] to all other nodes.

[100, s]
Initialization
A 15 [∞, -]
C
100 20 55
10
30 60
[0, -]* s B D [∞, -]
[30, s]

34
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.
• Step 3: For all node j connected to i by arcs that do not have
permanent labels, compare the current temporary distance label d(j)
with d(i)+c(i,j). If d(i)+c(i,j)<d(j), give a temporary label to node j with
[d(i)+c(i,j),i].
• Step 4: Go to Step 2. Cannot go to Node A
[100, s] from Node B

Iteration 1 A 15 [40, B]
C
100 20 55
10
30 60
[0, -]* s B D [90, B]
[30, s]* 35
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: Go to Step 2.
40 + 15 = 55 < 100

Iteration 2
[100, s] [55, C]
A 15
C [40, B]*
100 20 55
10
30 60
s B D
[0, -]* [30, s]* [90, B]
36
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: Go to Step 2. Node B is the only node connected from
Node A, but it already has a permanent
[55, C]* label → No change needed

A 15 [40, B] *
Iteration 3 C
100 20 55
10
30 60
[0, -]* s B D [90, B]
[30, s]* 37
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• Step 2: Select the node with the smallest temporary label, say node i,
and make it permanent.
• Step 3: For all node j connected to i by arcs that do not have permanent
labels, compare the current temporary distance label d(j) with d(i)+c(i,j).
If d(i)+c(i,j)<d(j), give a temporary label to node j with [d(i)+c(i,j),i].
• Step 4: If all nodes have permanent labels, STOP.
Only one temporary label left,
[55, C]* which is changed to permanent.

A 15 [40, B] *
Iteration 4 C
100 20 55
10
30 60
[0, -]* s B D [90, B]*
[30, s]* 38
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• What is the shortest path from Node s to Node A?
– Node A → Node C → Node B → Node s
– Shortest path: s-B-C-A, Distance 55.

[55, C]*
1 A 15 [40, B] *
C
100 20 55
10
30 60
1 s B D [90, B]*
[0, -]* [30, s]*

39
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads
• What is the shortest path from Node s to Node A?
Min 𝑍 = 100𝑥𝑠𝐴 + 30𝑥𝑠𝐵 + 20𝑥𝐴𝐵 + 10𝑥𝐵𝐶 + 60𝑥𝐵𝐷 + 15𝑥𝐶𝐴 + 55𝑥𝐶𝐷

s.t. (Outflow – Inflow = Net Flow)

𝑥𝑠𝐴 + 𝑥𝑠𝐵 = 1 (Node s - Supply)


𝑥𝐴𝐵 − 𝑥𝑠𝐴 − 𝑥𝐶𝐴 = −1 (Node A - Demand)
𝑥𝐵𝐶 + 𝑥𝐵𝐷 − 𝑥𝑠𝐵 − 𝑥𝐴𝐵 = 0 (Node B - Intermediate)
𝑥𝐶𝐴 + 𝑥𝐶𝐷 − 𝑥𝐵𝐶 = 0 (Node C - Intermediate)
−𝑥𝐵𝐷 − 𝑥𝐶𝐷 = 0 (Node D - Intermediate)
𝑥𝑖𝑗 ≥ 0 for all i and j 1 A 15
C
100 20 55
10
30 60
1 s B D

40
Shortest Path Problem – Dijkstra’s Algorithm
Example 2: Travelling in a City with One-Way Roads

• What is the shortest path from Node s to Node A?


𝑥𝐬𝐀 𝑥𝒔𝑩 𝑥𝑨𝑩 𝑥𝑩𝑪 𝑥𝑩𝑫 𝑥𝑪𝑨 𝑥𝑪𝑫
Min Z = 100 30 20 10 60 15 55
Node s 1 1 =1
Node A -1 1 -1 = -1
Node B -1 -1 1 1 =0
Node C -1 1 1 =0
Node D -1 -1 =0

1 A 15
C
Each column has one “1” and one “-1” 55
100 20
10
Optimal: z = 55, xsB = 1, xBC = 1, xCA = 1 30 60
1 s B D
41
Shortest Path Problem – Dijkstra’s Algorithm
Summary

• The shortest path problem have many real life applications.

• There are many different kinds of shortest path problems:


undirected graph, directed graph, with/without negative
edge/curve weight, with/without negative cycle, k-shortest
path, etc.

42
Formulating and Solving Network Flow
Problems

Maximal Flow Problem

43
Maximal Flow Problem

• The maximal flow problem is concerned with determining the


maximal volume of flow from one node (called the source) to another
node (called the sink).

• In the maximal flow problem, each link has a maximum flow capacity
which limits the flow through the arc.
1 12 3
16 20
• There is no cost associated with the flow.
s 10 4 9 7 t
• For any directed graph D = (V, A)
13 14 4
– Source (node): vs 2 4
– Sink (node): vt V: Set of vertices (nodes)
– Intermediate points (nodes): vi A: Set of arcs
– Link capacity: u(vi, vj)  0 (or uij) for each link (vi, vj)A

• Network D = (V, A, U)

44
Maximal Flow Problem

• Flow: a function f = {f(vi, vj)} (or link flow fij)

• Feasible flow: a flow f that satisfies:


– Capacity limitation:
for  link (vi, vj)A, 0  fij  uij
– Flow conservation:

q i=s

 fij −  f ji =  0 i  s, t
( vi ,v j )A ( v j ,vi )A −q i = t

where q is the volume of the feasible flow
• A feasible flow always exists, e.g., q = 0

45
Maximal Flow Problem: LP Formulation

Maximal Flow
max q
f
Flow
s.t. Conservation
q i=s

 fij −  f ji =  0 i  s, t
( vi ,v j )A ( v j ,vi )A −q i=t

0  fij  uij ,  ( vi , v j )  A

Capacity
Limitation

46
Maximal Flow Problem: LP Formulation: Example

• To determine the maximal flow in the network

12
16 1 3 20
s 10 4 9 7 t
13 4
2 4
14

Capacity

47
Maximal Flow Problem: LP Formulation

1 12 3
16 20
+𝑞 −𝑞
s 10 4 9 7 t
Max 𝑞
13 4
s.t. (Flow conservation) 2 4
14
𝑓𝑠1 + 𝑓𝑠2 = 𝑞 (Node s - Source)
𝑓12 + 𝑓13 − 𝑓𝑠1 − 𝑓21 = 0 (Node 1 - Intermediate)
𝑓21 + 𝑓24 − 𝑓𝑠2 − 𝑓12 − 𝑓32 = 0 (Node 2 - Intermediate)
𝑓32 + 𝑓3𝑡 − 𝑓13 − 𝑓43 = 0 (Node 3 - Intermediate)
𝑓43 + 𝑓4𝑡 − 𝑓24 = 0 (Node 4 - Intermediate)
−𝑓3𝑡 − 𝑓4𝑡 = −𝑞 (Node t – Sink/Destination)

(Link capacity constraints)


0 ≤ 𝑓𝑠1 ≤ 16 0 ≤ 𝑓𝑠2 ≤ 13 0 ≤ 𝑓12 ≤ 10 0 ≤ 𝑓13 ≤ 12
0 ≤ 𝑓21 ≤ 4 0 ≤ 𝑓24 ≤ 14 0 ≤ 𝑓32 ≤ 9 0 ≤ 𝑓3𝑡 ≤ 20
0 ≤ 𝑓43 ≤ 7 0 ≤ 𝑓4𝑡 ≤ 4
48
Maximal Flow Problem: Multiple Sources Network

• What if we have several sources and several destinations? We


want to maximize the total flow from all sources to all
destinations.
– Create a super-source and a super-sink.

49
Maximal Flow Problem:
Application Example

• Petroleum products in a pipeline network

• Cars in a road network

• Messages in a telecommunication network

• Capacity of a water distribution network

• Internet bandwidth

• Electrical power in the electricity supply network

• Sewer in the sewerage system

50
Formulating and Solving Network Flow
Problems

Minimum Spanning Tree Problem

51
Minimum Spanning Tree Problem
(undirected graph)

• For a network, a tree is a cycle-free (no cycle) connected network


consisting of a subset of nodes, and a spanning tree is a tree that
links all the nodes of the network.

2 4 2

1 3 5 1 3
Network Tree

2 4 2 4 2 4

1 3 5 1 3 5 1 3 5

Spanning Tree 52
Minimum Spanning Tree Problem
(undirected graph)

• Goal: To identify a spanning tree of


minimum cost or length.

• Any node should be reachable from any


other node in the network, but there
should be no redundant connections.

• Minimum spanning tree problem can be


formulated and solved as LP, but it is not
practical because numerous constraints
must be added to exclude all cycles,
resulting in a huge LP for even small
networks.

53
Minimum Spanning Tree Problem: Applications

• Constructing highways or railroads spanning several cities.


• Connecting a number of computer sites by high-speed lines, at the
least possible monthly leasing cost.
• Determining the minimum pipeline
network connecting offshore natural
gas wellheads with an inshore
delivery point.

Hub-and-Spoke

54
Summary

• Network Flow Models


– Minimum cost flow problem – most fundamental network flow model
– For each arc: Amount of flow, upper and lower bounds, and unit flow cost
– For each node: Net flow = +ve (sources), 0 (intermediate nodes), -ve (sinks)

• Shortest Path Problem


– Shortest path from an origin node to a destination node. One unit of demand.
– Besides solving as LP, Dijkstra’s Algorithm can be used.

• Maximal Flow Problem


– Find the maximal volume of flow from the source to the sink.
– Besides solving as LP, Maximal Flow Algorithm can be used.

• Minimum Spanning Tree Problem


– Link all the nodes in a network with no cycles at the minimum cost or length.
– Not practical to be formulated and solved as LP.

55

You might also like