1 chapter-4: network flow modeling & optimization deep medhi and karthik ramasamy august 2007 ...
TRANSCRIPT
![Page 1: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/1.jpg)
1
Chapter-4: Network Flow Modeling &
OptimizationDeep Medhi and Karthik
RamasamyAugust 2007
http://www.NetworkRouting.net
© D. Medhi & K. Ramasamy, 2007
![Page 2: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/2.jpg)
2
Terminologies• Traffic volume/ demand volume
– Different units for different purpose• Mbps, Gbps : data rate (both data networks and transport
networks)• Erlang (telephone calls)• First to discuss in terms of pure numbers; later we’ll use
how the above units are used
• Demand pair, or node pair: between two points(nodes)– 1:2, 2:3
• Link: connects two points (nodes) directly– Bidrectional (1-2) or unidirectional (1->2)
• Flow: aggregation of traffic:– Link flow (for different pairs of demand)
• Capacitated Network: links have given capacity
![Page 3: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/3.jpg)
3
A three-node illustration
![Page 4: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/4.jpg)
4
Single-Commodity flow
• Consider just one demand 1:2 with volume h [link capacity c on all links]
![Page 5: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/5.jpg)
5
• Consider unit cost of paths• Now we optimize cost of routing
• Minimum cost routing• Model (4.2.3)
![Page 6: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/6.jpg)
6
Solution
• For different scenarios:12 = 1, 132 = 2 (first path is cheaper than
second part)• Optimal:
x12* = h, x132*= 0 if 0 ≤ h ≤ 10
x12*= 10, x132* = h - 10, if 10 ≤ h ≤ 20
12 = 2, 132 = 1 (second path is cheaper than first part)• Optimal:
x12* = 0, x132*= h if 0 ≤ h ≤ 10
x12*= h-10, x132* = 10, if 10 ≤ h ≤ 20
![Page 7: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/7.jpg)
7
Another objective: load balancing
• Minimize maximum load on a link (4.2.6):
![Page 8: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/8.jpg)
8
• In this case, it’s optimal when the load (utilization) is equal
• Thus, in this case, split equally– [Note: this work only in the case of two
segments]
![Page 9: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/9.jpg)
9
Another objective: minimize delay (4.2.9)
• Objective is non-linear; solution (after some math)
[first, reduce to one variable. Then differentiate with respect to the other Variable and set to zero. Finally, bounds are applied because the solutionMust lie in the allowed region.]
![Page 10: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/10.jpg)
10
Observations about solutions for different objectives
Figure 4.3
![Page 11: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/11.jpg)
11
Summary from Figure 4.3
• For different objectives, the solution quality can be quite different
• However, at extreme ends (very low traffic or very high traffic compared to capacity), the solutions are quite similar
![Page 12: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/12.jpg)
12
Now consider multiple demands: Multi-commodity
flow
• 3-node network: all node pairs have traffic– Each pair has two paths
![Page 13: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/13.jpg)
13
• Path flow for each node pair:
• Link flow:
![Page 14: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/14.jpg)
14
Minimum cost routing optimization
• Model (4.3.4)
![Page 15: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/15.jpg)
15
Solving using CPLEX
• <Example 4.2>
![Page 16: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/16.jpg)
16
CPLEX output
![Page 17: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/17.jpg)
17
What happens if the variables take only integer values (integer linear programming)
(4.3.5)
![Page 18: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/18.jpg)
18
Using CPLEX for integer linear programming (ILP)
Solution:
Declare appropriate bound(default is 0 <= x <= 1)
Declare Integer variables
![Page 19: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/19.jpg)
19
Load balancing
• Minimize maximum Link utilization (4.3.8)
Objective is piece-wise non-linear
Link flow
![Page 20: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/20.jpg)
20
Transform objective to a linear equivalent case:
• Set
• Now,
![Page 21: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/21.jpg)
21
Transform (4.3.8) to the linear case: (4.3.12)
redundant
![Page 22: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/22.jpg)
22
Solution: load balancing
![Page 23: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/23.jpg)
23
Average Delay case
![Page 24: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/24.jpg)
24
Piece-wise linear approximation• Approximate
as:
![Page 25: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/25.jpg)
25
Model (4.3.14) is approximated as Model
(4.3.19)
![Page 26: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/26.jpg)
26
General Case: New notation
• Notation: renumbering (first with 3-node)
• Now, (4.3.4) becomes following model (4.4.3):
![Page 27: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/27.jpg)
27
• Look at the relation: Link to Path
• Use ‘delta’ notation:
Path 1 for demand pair 1 uses link 1 -> 1Path 1 for demand pair 1 uses link 2 -> 0
![Page 28: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/28.jpg)
28
Notations:
![Page 29: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/29.jpg)
29
• Generic demand flow for K demands:
• Link flow for each link (l=1,2…,L):
• Capacity constraint:
![Page 30: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/30.jpg)
30
Minimum Cost Routing: General Case
• Link-Path formulation (4.4.7):
![Page 31: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/31.jpg)
31
Some numbers
• Link-Path formulation
• Means: need to generate ‘possible’ paths– Use k-shortest path algorithm (or other
means)
![Page 32: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/32.jpg)
32
An important result
• Result 4.1– If (4.4.7) is feasible, then at most K+L
flow variables are required to be nonzero at optimality
Illustration:
N = 50, L = 200, K = 1225
Of total 12,250 flow variables, at most K+L = 1,425 would need to be non-zero at optimality
Since ther are 1,225 demand pair, each pair must have at least one path that’s non-zero, which means at most 200 demand pairs would have more than one non-zero path at optimality
![Page 33: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/33.jpg)
33
Load balancing: general case
• (4.4.10):
![Page 34: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/34.jpg)
34
Minimum cost routing: non-splittable flow
• Declare each path (ukp) as 0/1 option; thus, only one path to be chosen for each pair
• Optimization formulation: integer multi-commodity flow problem (4.5.3)
![Page 35: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/35.jpg)
35
• So far, we have done link-path based formulation
• Node-arc based formulation is possible: to show for the load balancing problem– Need to consider the flow on a link for a
particular demand– Need to consider link-path indicator in
terms of node incidence
![Page 36: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/36.jpg)
36
• avl := 1 if link l originates at node v; 0, otherwise
• bvl := 1 if link l terminates at node v; 0, otherwise
![Page 37: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/37.jpg)
37
Load balancing in node-link formulation (4.4.12)
![Page 38: 1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August 2007 © D. Medhi & K. Ramasamy, 2007](https://reader031.vdocument.in/reader031/viewer/2022013122/56649e5f5503460f94b58a3b/html5/thumbnails/38.jpg)
38
Summary
• Multi-commodity network flow– Started with a single-commodity example for a
3-node network• Three different objectives considered
– Linearization of non-linear delay objective discussed• Solutions compared
– Multi-commodity example for a 3-node network– The general case: link-path formulation and
node-link formulation
• Linear programming solver: CPLEX– How to handle integer linear programming
problems