Title: MultiCommodity Network Flow Analysis Part 1
1Multi-Commodity Network Flow Analysis (Part 1)
2Recap
- We learnt about the Decision Model
- Mapping between real world and mathematical form
- We introduced the term Linear Programming
- We solved the LP
- We looked at the Single Commodity Network Flow
problem
3Multi-commodity nature
- The structure of the network is exactly the same
as the network flow problem - Flows are now can be categorized by various types
(even on the same link)
10 units of a product
i
j
5 units of product A 2 units of product B 3 units
of product C
- Flows of rice vs Flows rice type A type B
type C
4Multi-commodity nature
- Also the supply and demand can be defined by
different commodity - Similarly, the cost of transshipment through a
link can also be defined different by different
commodities
5Assumptions (for now)
- Homogeneous goods. Each unit flow of commodity k
on (i,j) uses up one unit of capacity on (i,j). - No congestion. Cost is linear in the flow on
(i,j) until capacity is totally used up. - Fractional flows. Flows are permitted to be
fractional.
6Application areas
7On Fractional Flows
- In general, multicommodity flow problems have
fractional flows, even if all data is integral. - The integer multicommodity flow problem is
difficult to solve to optimality.
8Shared arc capacity and arc cost
10 units of a product
10 units of a product
i
j
i
j
5 units of product A 2 units of product B 3 units
of product C
5 units of product A 2 units of product B 3 units
of product C
Total flow (i-j) link capacity
9Multi-commodity flow problem case
- OSI makes low-cost cars at plants in Korat and
Saraburee. - Completed cars are shipped by freight-rail to one
of OSIs two distribution centers in Ayuthaya and
Chonburi - Then distributed to customer facilities in
Bangkok, Rayong, and Samutparkarn - Out task is to plan OSIs distribution of new
models Thai-CEO-2004 AND Thai-APEC-2004 cars
over the next quarter - Each plant can produce up to 500 units of each
models during this period and none are presently
stored at distribution centres - The forecasted demand at Bangkok, Rayong, and
Samutparkarn are 300 (CEO), 300 (APEC) 300
(CEO), 150 (APEC) 400 (CEO), 300 (APEC)
respectively - Transfers between the distribution centres is
possible with no costs but limited to 25 units
(total amount) - Costs of transports between each locations are
shown in the following tables
10For CEO
11For APEC
12Rayong
300
5
Korat
Ayuthaya
300
500
1
3
500
Samutpakarn
300
6
150
500
2
4
250
BKK
Saraburee
Chonburee
400
7
300
13Variables
14Flow conservation in multi-commodity
- Same as single-commodity flow model
- But for one node, we will have the number of
equations number of commodities - Example Node 4
X3,4
X4,3
X4,5
4
X4,6
X2,4
15(No Transcript)
16- Similarly to single commodity network flow case,
source nodes and sink nodes will have the RHS
value
17Objective functions?
- As shown, the cost of transport on each link
depends on commodity types
18Full problem (a bit long!)
19Solution via Excel
Excel
Rayong
300
5
Korat
Ayuthaya
300,300
300
500
500,500
1
3
500
300,150
Samutpakarn
400,50
300
6
500,0
150
500
2
4
250
0,250
BKK
Saraburee
Chonburee
400
7
400,300
300
20Link capacity
- As mentioned can be defined either by total link
flow (aggregated all commodities) OR by each
commodity flow - With OSI example, we try to use link capacity for
the total flow of 600 - And, use different link capacities for CEO and
APEC, 400 and 300
21Solution via Excel
Excel
Rayong
300
5
Korat
Ayuthaya
300,300
300
500
100,500
1
3
500
300,150
Samutpakarn
400,0
300
0,50
6
100,0
500,0
150
100,0
500
2
4
250
0,250
BKK
Saraburee
Chonburee
300,300
400
7
300
22Solution via Excel
Excel
Rayong
300
5
Korat
Ayuthaya
300,300
300
500
400,300
1
3
500
300,150
Samutpakarn
100,200
300
200,0
6
0,150
400,0
150
500
2
4
250
100,250
BKK
Saraburee
Chonburee
400,300
400
7
300
23A slightly different formulation
- We define the supply-demand via
Origin-Destination Matrix (O-D matrix)
24Rayong
5
Korat
Ayuthaya
1
3
Samutpakarn
6
2
4
BKK
Saraburee
Chonburee
7
25O-D matrix for OSI problem
26Problem formulation of O-D case
- Each O-D movement is designated as one commodity
- Then use the normal single-commodity formulation
27A
Rayong
A
5
Korat
Ayuthaya
D
1
3
B
B
Samutpakarn
C
6
E
Saraburee
D
2
4
BKK
C
Chonburee
E
7
F
F
28A Linear Multicommodity Flow Problem
29A Linear Multicommodity Flow Problem
5
1
4
1
1
1
2
5
u25 5
1
1
6
3
6
30The Multicommodity Flow LP
31The Multicommodity Flow LP
32Drawback of node-based formulation
- The number of variable number of link x number
of commodities types - With a relatively small network like OSI network,
we can have up to 12 x 2 24 variables - Also, the number of constraints number of nodes
x number of commodities - So sometime, with a large scale problem we may
have a massive number of variables and
constraints! - Another drawback is that sometime costs happened
differently path by path (not link by link) - How can we reduce the problem?
- One way is to reformulate problem using
path-based formulation
33Another approach path-based approach
- Represent flows from o to d as the sum of flows
in paths. - The resulting LP may have an exponential number
of columns - Use column generation to solve the LP.
- Good trick, all paths are not needed to be define
as priori - The algorithm will sequentially generate a set of
necessary paths as the iteration progress
34A Linear Multicommodity Flow Problem
5
1
4
1
1
P1 set of paths from node 1 to node 4.
P2 set of paths from node 3 to node 6.
1
2
5
u25 5
1
1
u32 2
6
3
6
P1 1-4, 1-2-5-4
P2 3-6, 3-2-5-6
35A path based formulation
c(1-4) 5c(1-2-5-4) 3c(3-6) 6c(3-2-5-6
) 3
f(P) flow in path P c(P) cost of path P
Minimize 5 f(1-4) 3 f(1-2-5-4) 6 f(3-6)
3 f(3-2-5-6)
f(P) ? 0 for all paths P
36Optimal solution for the path based version
5
1
4
1
1
f(1-4) 2 f(1-2-5-4) 3
f(3-6) 1 f(3-2-5-6) 2
1
2
5
u25 5
1
1
u32 2
6
3
6
The path based LP can be solved using the simplex
method.
37General formulation for the path based version
Let Pk set of directed paths from ok to dk
Let ck(P) cost of path P ? Pk.
Let f(P) flow on path P.
Master Problem
Aggregated link flows from overlapping path flows
38bundle constraints one for each capacitated arc.
supply demand constraints one for commodity.
variables one for each path from origin to
destination
39Some time costs happen at path level!
- Toll by distance rate
- Some tax or duty
- All node-based formulation we used before cannot
deal with this problem - We need to use path-based formulation and then
implement the costs associated with each path
40Rayong
5
Korat
Ayuthaya
1
3
Samutpakarn
6
2
4
BKK
Saraburee
Chonburee
7
41Flow with gain and loss
- As explained, flows can only enter and exit
through the nodes in the network only! - It may not be true sometime!
- Some flow can suddenly increase or decrease on
the link - Any example in real life?
42Reliability path analysis
- Sometime minimum path cost is not the more
preferred option! - Sometime we need some reliability to ensure the
minimum level of service - Each link is attached with a Probability of
operation (e.g. 0.93 in 100 days this link
fails in 93 days) - Then we seek a path with highest probability of
operation!
43Reliability path analysis
- Link A has a probability of operation of 0.95
- Link B has a probability of operation of 0.82
- If this path uses both link, the probability of
this path to operation is
- Pi,j is a probability of link (i,j) to be
operated - So the probability of path with link 1 and 2 to
operate is 0.95x0.72 0.779 - The objective is to maximize the above equation???
44Reliability path analysis formulation
- Since we try to use LP (to exploit good
characteristics of LP), we need to modify the
objective function of reliability path analysis
problem - The KEY is to take LOG the objective function!
Why?
- Thus, the objective function of the problem is
changed to
- This means we only need to change the link cost
of network flow problem to log(Pi,j)
45Formulation of reliability
Rayong
5
Korat
Ayuthaya
0.91
0.88
1
3
0.95
0.90
Samutpakarn
0.94
0.95
6
0.98
0.95
0.90
2
4
0.92
0.89
BKK
Saraburee
Chonburee
7
0.88
46Formulation of flows with gain and loss
Excel
Rayong
5
Korat
Ayuthaya
Log(0.91)
Log(0.88)
1
3
Log(0.95)
Samutpakarn
Log(0.90)
Log(0.95)
Log(0.96)
Log(0.98)
6
Log(0.95)
Take log
Log(0.90)
2
4
Log(0.89)
Log(0.92)
BKK
Saraburee
Chonburee
7
Log(0.88)