270 likes | 422 Views
Traffic and routing. Network Queueing Model. Packets are buffered in egress queues waiting for serialization on line Link capacity is C bps Average packet length is P bits Service is modelled as independent with exponential distribution Service rate is ¹ = P/C
E N D
Network Queueing Model • Packets are buffered in egress queues waiting for serialization on line • Link capacity is C bps • Average packet length is P bits • Service is modelled as independent with exponential distribution • Service rate is ¹ = P/C • Ingress and egress flows are homogeneous Poisson
Queue and Delay Calculations • Each link is modelled as and M/M/1 queue • Average queue length Q=½/(1-½) =¸/(¹ -¸) • ½ = ¸/¹ <1 • Average waiting time (delay): T=1/(¹ -¸) • Little: ¤ T = Q (also for the entire network) • Q= i¸i /(¹i - ¸i) (for entire network) • T=1/¤ i¸i /(¹i - ¸i) (average delay for entire network)
Delay optimal routing • Given a set of edge inflows ¤sd • s,d: source, destination • ¤ = s,d¤sd • A delay optimal route mimizes T under flow constraints and given inflows. • Nonlinear cost • Difficult non-convex problem.
Afine (linear cost) • For a given link ”i” the cost of a flow is: bi + ai¸i • Overall cost: C=ibi + aisd¸sdi =B + i aisd¸sdi =B + sdi ai¸sdi • ¸sdi : is the flow from s to d routed over i • Minimization of C w.r.t. {¸sdi} • min{C}=B + min i aisd¸sdi =B + min sdi ai¸sdi =B + sd min i ai¸sdi
Afine cost • min{C} = B + sd min i ai¸sdi • min i ai¸sdi for fixed s,d s.t. {¸sdi} routes ¸sd from s to d ¸sd ¸sd ¸sd ¸sd a1 ½¸sd a2 ½¸sd ¸sd a3 a5 ½¸sd a4 ¸sd a6 a12 ¸sd a7 (1-½) ¸sd a11 a10 a9 a8
Afine cost ¸sd ¸sd ¸sd ¸sd a1 ½¸sd • C= B + ¸sd(a1 + a2 + a3 + a10 + a11 + a12 ) + ½¸sd (a4 + a5 + a6) + (1-½) ¸sd (a7 + a8 + a9) • Assume (a4 + a5 + a6) < (a7 + a8 + a9) • Then • C’ = B + ¸sd(a1 + a2 + a3 + a10 + a11 + a12 ) +¸sd (a4 + a5 + a6) < C • Routing everything through a4,a5,a6 is better • Optimal routes are single path • Optimal routes are optimal paths where link costs are {ai} a2 ½¸sd ¸sd a3 a5 ½¸sd a4 ¸sd a6 a12 ¸sd a7 (1-½) ¸sd a11 a10 a9 a8
Afine approximation of delay • T=1/¤ i¸i /(¹i - ¸i) • ¸i =sd¸sdi • T({¸sdi}’) = T({ ¸sdi })+ sdi (¸sdi’ -¸sdi) T/¸sdi • T/¸sdi = T/¸i = ai =1/¤ ¹i/(¹i - ¸i)2 • T({¸sdi}’) = T({ ¸sdi })+ sdi (¸sdi’ -¸sdi) T/¸sdi = T({ ¸sdi })+ sdi (¸sdi’ -¸sdi) a_i = T({ ¸sdi })- sdi ¸sdi a_i +sdi ¸sdi’ a_i = B +sdi ¸sdi’ a_i
Small Flow Devitation • Let ¸sdiand ¸sdi’ both be a flows routing {¤sd} • Then for 0<a<1, ¸sdi’’ = a¸sdi +(1-a)¸sdi’ is also a flow routing {¤sd} (The set of flows is convex) • ¸sdi’’ may not comply to capacity contraints, but if ¸sdi does we can find a ¼ 1 so that ¸sdi’’ also does
The Flow Deviation Method • Fratta, Gerla and Kleinrock (1973) • Given a flow {¸sdi} • For each s,d take a portion of the flow and re-route • Re-routing will be along shortest paths w.r.t. link costs: T/¸sdi = ai =1/¤ ¹i /(¹i - ¸i)2 • Since cost is approximately affine for small deviations, the new flow will have lower cost
The Flow Deviation Method • Fratta, Gerla and Kleinrock (1973) • Let old flow be: {¸sdi} and new flow: {¸sdi’} • Find a: 0<a<1, mimimizing T({¸sdi’’}) = T({a¸sdi+(1-a)¸sdi’}) • Fratta, et. al. suggest: The portion rerouted is the portion previously routed along highest cost route w.r.t {ai}
Miniproject • Suggest a network flow problem for which the Flow Deviation Method is meaningfully illustrated. • Write a program implementing the Flow Deviation Method for the suggested network. • Initial routes could be shortest paths (hop-count)
Routing and wavelength assignment • Since wavelengths are not mixed, traffic sources do not interfere. • Queueing is limited to edge nodes. • Routing delay is purely propagation – proportional to hop count. • Routes may be assigned initially and wavelengths assigned afterwoods. • Routes may be assigned as shortest path and in traffic load order
Wavelength assignment • Given routes R={Ri} previously assigned. • Create the auxiliary graph G • V(G): routes in R • (Ri,Rj) 2 E(G) iffRi share fibre with Rj • Assign colours to vertices (routes), such that no neighbouring vertices have identical colours. • Classical graph colouring problem. • The problem: is it possible i n colours ? is generally NP-complete • The 4-colour problem for planar graphs is solved. (colouring of countries on map)
Wavelength assignment • Sequential policy (colours are used in order): given a vertice order v1,..,vn 1) select a colour for v1 2) j=2 3) If (all assigned colours are in the neighbours of vj ) assign new colour to vj else Assign vj an already assigned colour not within its neighbours. 4) j=j+1 5) if (j<=n) goto 3
Wavelength assignment • Smallest number of colours Â(G): chromatic number of G • Th: Some sequential assignment uses Â(G) colours • Proof: Given a Â(G) assignment Define a colour ordering Order vertices in colour order v1,..,vn defines a sequential assignment • There are n! (!!!!) different orderings.
Operational sequential policy • Â(G) · deg(G)+1 = max {deg(Ri)} +1 • If deg(G)+1 colours assigned, there is allways 1 non-neighbouring color assigned and no new colour is needed • Heuristic: assign colours to highest degree nodes first.
Operational sequential policy • Ordering: deg(v1) ¸deg(v2) .. ¸deg(vn) • Â(G) · max 0 <= i <= n min{i,1+deg(vi)} • Proof: At step i we consider the subgraph v1,..,vi As long as i ·deg(vi)+1 assign i colours – one to each vertice Let i* be the smallest i so that i ¸deg(vi)+1 Then i* ¸ deg(vi)+1 for all i ¸ i* For i ¸ i* we need no new colours deg(vi)+1 i i
Alternate order • Given a vertice order v1,..,vn • Number of colours needed: · max 1<= i <= n (1+degi(vi)) • degj(vi): the degree of vi in the subgraph (v1,..,vj), where i · j • Proof: We assign colours in in order v1,..,vn. When assigning colour to vi, you will never need more colours than 1+degi(vi) • Note: degi(vi) ·deg(vi) 8 i
Alternate order 1) select minimum degree vertice vn 2) j=n-1 3) Select vj so that degj(vj) is minimum (degj(vj): degree in G-(vn,..,vj+1)) 4) j=j-1 5) if (j ¸ 1) goto 3) • The order obtained mimimizes degj(vj) for all j
Miniproject • Suggest a network flow problem for which the colouring schemes may be meaningfully illustrated • Write a program that: - Finds shortest path routes for s,d pairs - Constructs the auxiliary graph - Estimates the number of colours needed for colouring in degree order - Performs the colouring in degree order - Finds the alternate order - Estimate number of colours needed in alternate order - Performs colouring in alternate order
Linear programming (ILP) Number of colours All lines have at most Fmax colours Flow equations pr colour -- Wavelength continuity Free variables: Number of paths required from s to d Number of LP over link i,j between s and d, at colour w At most 1 LP over link i,j at colour w
ILP example 2 • ¤1 = ¤2 = ¤3 = 1 • F i,wj2 {0,1} (s=j 2 {1..3}, d fixed) • w,jF i,wj· F • w¸j,w = ¤j • j F i,wj· 1 • j=1: s=1=j, d=3: F 3,w1 - F 1,w1 = - ¸1,w s=2, d=1=j: F 3,w2- F 1,w2= ¸2,w s=3, d=2: F 3,w3- F 1,w3= 0 ¤2 ¤3 F1 F2 F3 1 3 ¤1
YALMIP • %YALMIP program for exercise in Network Performance • %A number of integer F matrices - one for each colour • F=3; %number of colours • F1=intvar(3,3); • F2=intvar(3,3); • F3=intvar(3,3); • %lambdas • lambda=binvar(3,F); • %Lambdas; • L=ones(3,1); • %problem formulation • P1=[lambda*ones(F,1)==L]; • P2=[(F1+F2+F3)*ones(3,1) <= F*ones(3,1)] • P3=[F1*ones(3,1)<=ones(3,1),F2*ones(3,1)<=ones(3,1),F3*ones(3,1)<=ones(3,1)]; • P=[P1 P2 P3]; • S=solvesdp(P);
Miniproject • Encode flow constraints in the YALMIP program for the example network
Miniproject • Write a summary on the paper: Wavelength-Routed Optical Networks: Linear Formulation, Resource Budgeting Tradeoffs, and a Reconfiguration Study by: Dhritiman Banerjee and Biswanath Mukherjee • Objective ? • Method ? • Results ?