Network Planning VITMM215 Markosz Maliosz 10/14/2015 Shortest Path - - PowerPoint PPT Presentation

network planning
SMART_READER_LITE
LIVE PREVIEW

Network Planning VITMM215 Markosz Maliosz 10/14/2015 Shortest Path - - PowerPoint PPT Presentation

Network Planning VITMM215 Markosz Maliosz 10/14/2015 Shortest Path Link Weights What should be the link weights? physical distance? delay on a link? hop count (w=1)? some arbitrary number? Ciscos default:


slide-1
SLIDE 1

Network Planning

VITMM215

Markosz Maliosz 10/14/2015

slide-2
SLIDE 2

Shortest Path – Link Weights

 What should be the link weights?

– physical distance? – delay on a link? – hop count (w=1)? – some arbitrary number?

 Cisco’s default:

– inversely proportional to its capacity – higher capacity links are “shorter” – drives traffic to higher capacity links – can lead to strange routing

2

slide-3
SLIDE 3

Link weight setting example

3

 Traffic:

– q  t : 1 – 3  t : 1 – s  t : 1 – w  t : 1

slide-4
SLIDE 4

Link Weights

 The correct choice depends on objectives  Common goal: minimize delays

– if propagation delay is dominant

  • minimize physical path distance
  • weight = link distance

– if processing delay is dominant

  • minimize hop count, weight = 1

– if queuing delay is dominant

  • measure delays along links
  • calculate shortest path according to measured delay

values

4

slide-5
SLIDE 5

Tree Networks

 Connects all nodes with minimum number

  • f links

 There is one and only one path between

any node pairs

 Example applications:

– cable TV network: broadcast from one source to many – Ethernet Spanning Tree Protocol

5

slide-6
SLIDE 6

6

Spanning Tree

 Def.: subgraph, which is a tree and

contains all nodes

slide-7
SLIDE 7

7

Minimum spanning tree

 link cost  edge weights  The minimum spanning tree is the minimum cost

spanning tree among all spanning trees

 If each link has a distinct weight, there will be a

unique MST, otherwise the MST is not unique

slide-8
SLIDE 8

8

Kruskal’s Algorithm

 Greedy algorithm to find minimum spanning tree

– create a forest F (a set of trees), where each node in the graph is a separate tree – At each step, take the minimum-weight edge

  • if it connects two different trees, then add to the forest 

combine the two trees into a single tree

  • otherwise discard that edge

– If there is only one tree, the problem is solved Animation: http://students.ceid.upatras.gr/~papagel/project /kruskal.htm

slide-9
SLIDE 9

Prim’s Algorithm

 Greedy algorithm to find minimum spanning tree

– select an arbitrary node as initial element of the set – in each iteration, choose a minimum-weight edge (u, v), connecting a node v in the set to the node u

  • utside of the set, then node u is brought into the set

– this process is repeated until all the set will contain all nodes

 When the algorithm terminates, the edges in the

set form a minimum spanning tree Animation: http://students.ceid.upatras.gr/~papagel/project/p rim.htm

9

slide-10
SLIDE 10

10

Calculating Spanning Tree

B A D C E F 5 2 4 6 10 4 6 2

Find the min-cost spanning tree in the graph!

9

slide-11
SLIDE 11

Ethernet STP

 An Ethernet network can have multiple

possible paths for reliability

 STP is intended to create a tree to avoid

loops – broadcast storm

 802.1D algorithm based on Dijkstra’s alg.

– switches are assigned numerical priorities – switch with lowest priority becomes root switch

  • tie break is lowest MAC address (are unique)

– each switch port is given a cost = link weight

  • based on bandwidth of the link

11

slide-12
SLIDE 12

STP Port Costs

 Default costs

– old version based on 1 Gbps/(link bandwidth) – new version: arbitrary table

  • port cost: integer, >0

12

Link speed Old cost New cost 10 Mbps 100 100 100 Mbps 10 19 1 Gbps 1 4 10 Gbps 1 2

slide-13
SLIDE 13

STP

 Bridge Protocol Data Units are sent

regularly

– priority, cost information and state – flooded through network

 Protocol finds min-cost path to root switch

with Dijkstra’s algorithm in a distributed way

– ports not on shortest path towards root bridge are blocked

13

slide-14
SLIDE 14

STP

 Optimization in STP

– minimizes path length for each leafs to get to the root – link weights can be arbitrary! – with default weights: pushes traffic to higher bandwidth paths

14

slide-15
SLIDE 15

Linear Programming

15

slide-16
SLIDE 16

Linear Programming

 Linear Programming is the optimization of an objective based

  • n some set of constraints using a linear mathematical model

 The word “programming” is used in the sense of “planning”  A Linear Program (LP) is a problem that can be expressed as

– a linear objective function, – subject to linear equality and linear inequality constraints

 Has many applications

– transportation, telecommunications, manufacturing, business

  • e.g. maximizing profit in a factory that manufactures a number of

different products from the same raw material using the same resources

– engineering: planning, routing, scheduling, assignment, design

  • minimizing resources in network planning to satisfy user demands
  • maximizing performance of the network with a limited cost budget

16

slide-17
SLIDE 17

17

Linear Program

 Standard form: find the values of xj variables, that minimize (or

maximize) the objective function z

 subject to (satisfying the following constraints):  Notation:

– objective function: z – variables to be determined, decision variables: xj – number of variables: n – coefficients: cj, aij, bi – number of constraints: m – bounds for variables

slide-18
SLIDE 18

18

Linear Program

 Standard matrix form:

  • c: cost coefficients

– subject to:

x c z

T

 max b x A                        

n

x x x 

1

 

n T

c c c 

1

          

mn m n

a a a a A     

1 1 11

          

m

b b b 

1

slide-19
SLIDE 19

19

LP Example

 A company manufacturing two products: P1, P2  3 manufacturing units are required to manufacture both products:

U1, U2, U3

 During a week the maximum operating hours for the machines:

– U1: 50 hours – U2: 35 hours – U3: 80 hours

 To manufacture a product it has to be processed on all of the 3

manufacturing units with the following manufacture times in hours (the sequence does not matter):

– U1 U2 U3 – P1 10 5 5 – P2 5 5 15

 Price of P1: 100$  Price of P2: 80$  How many pieces should from P1 an P2 to be manufactured to

achieve maximum income?

slide-20
SLIDE 20

20

LP Example

 The task is an optimization problem: find the maximum

income

 Variables to be determined: amount of P1 and P2 to be

manufactured, denoted as: x1 and x2

 Objective function

– maximize income = max (100 x1 + 80 x2)

 The limited working hours of the manufacturing units (U1, U2,

U3) restrict the amount of products that can be produced during a week  constraints U1 U2 U3 P1 10 5 5 P2 5 5 15 MWH 50 35 80 MWH= max. working hours Constraints: 10 x1 + 5 x2 ≤ 50 5 x1 + 5 x2 ≤ 35 5 x1 + 15 x2 ≤ 80 x1 ≥ 0 x2 ≥ 0

slide-21
SLIDE 21

21

Finding the Solution

 Feasible solutions

– x vectors, which satisfy the constraints and bounds

 Optimal solution

– x is feasible and cTx is minimal (maximal)

 Problem can be

– infeasible – unbounded

slide-22
SLIDE 22

22

Geometrical solution

2D representation:

Constraints: set of straight lines

F(x) = 100 x1 + 80 x2 = 800 (const) (a) 10x1 + 5x2  50 (b) 5x1 + 5x2  35 (c) 5x1 + 15x2  80

a b

x1

x2

10 5 15 10 5

c

P2 P1

3 4

P0

F(x) = 800

Sol: X1 = 3 X2 = 4

Extreme point

slide-23
SLIDE 23

23

Geometrical Representation

 Ax  b  Optimum:

slide-24
SLIDE 24

24

Solving LP

 Good general-purpose techniques exist for

finding optimal solutions

– All polynomial-size linear programs can be solved in polynomial time – Algorithms

  • Simplex
  • Barrier or Interior Point Method

– Software

  • CPLEX
  • GNU Linear Programming Kit (GLPK)
  • lp_solve
  • etc.
slide-25
SLIDE 25

25

Integer Linear Programming

 Pure Integer Problem (IP or ILP)

– Restriction: elements of vector x must be integers  searching the best integer solution

 Mixed Integer LP (MIP or MILP)

– Restriction: some elements of vector x must be integers

 Binary or zero-one ILP

– Restriction: elements of vector x must be 0 or 1 – many kinds of combinatorial and logical restrictions can be modeled through the use of zero-one variable

 Much harder problems: NP-hard in general

– solution time is much longer

slide-26
SLIDE 26

26

Integer Linear Programming

 Many real problems contain integer quantities,

e.g.:

– Set Covering Problem – Travelling Salesman Problem (TSP) – Knapsack problem

 Solving ILP

– Relaxation: variables are not constrained to be integers

  • if the continuous problem (LP) always has an integral optimal

value (assuming c is integral), then this optimal value is the solution for the ILP too, and it can be found efficiently (as in the previous example for manufacturing)

  • if the solution is not integral, then finding the optimum is

more difficult

slide-27
SLIDE 27

27

ILP Relaxation – 2D Illustration

slide-28
SLIDE 28

28

ILP Relaxation – 2D Illustration

 Optimal value of LP is far from integral

feasible solution:

slide-29
SLIDE 29

29

Solving ILP

 Branch and bound

– Branch:

  • decomposition into subproblems based on possible

variable settings recursively: forming nodes of a tree

– Bound:

  • infeasible subproblems pruned
  • compute upper and lower bounds

– by minimizaton: if the lower bound for some subproblem is greater than the upper bound for some other subproblem, then the former may be safely discarded from the search

 Branch and cut

– Eliminate non-integer solutions by adding cut constraints to LP

slide-30
SLIDE 30

Minimum cost ring topology planning

30

slide-31
SLIDE 31

31

Travelling Salesman Problem

 TSP:

– Given a list of cities and their pair-wise distance – The task is to find a shortest possible tour that visits each city exactly once

 In network planning: Find the minimum cost ring

topology

– the graph representation is a complete graph

  • If no path exists between two nodes, adding an arbitrarily

long edge will complete the graph without affecting the

  • ptimal tour

– cost

  • can also depend on distance
  • can be arbitrary

 The problem is NP-hard

slide-32
SLIDE 32

32

ILP Formulation of TSP

 Variables: xij – binary

– 0, if salesman does not travel from city i to city j – 1, if salesman travels from city i to city j

 Constraints:

– Visiting a city only once:

  • Arriving only once into a city (j):
  • Departing only once from a city (i):

j x

j i i ij

 

 

1

:

i x

j i j ij

 

 

1

:

                 1 1 1 1 x

slide-33
SLIDE 33

33

ILP Formulation of TSP

 Constraints permit:

– To have more tours – Back and forth between two cities

 Further constraint: only one tour is permitted

– Set of nodes: V – Number of nodes: N – Subset of nodes: S – Number of nodes in S: |S|

2 2 ; 1

,

     

N S V S S x

S j i ij

slide-34
SLIDE 34

34

ILP Formulation of TSP

 Explanation:

– Prevents small tours – If there is a tour in subset S, then it has |S| edges, and the constraint above is violated

 Problem: number of subsets = 2N  Another way to formulate:  Objective function:

– Distance between cities i and j: dij

2 2 ; 1

,

     

N S V S S x

S j i ij



i j ij ijx

d min

slide-35
SLIDE 35

35

Solving ILP of TSP

 Using a solver software (e.g. CPLEX, lp_solve, etc.)

– input: the ILP formulation – finds the exact optimum – the solving time highly depends on the problem size

 Interpreting the solution:

– If xij = 1, then route i-j is part of the tour

 Homepage devoted to the history, applications,

and current research of TSP:

– http://www.tsp.gatech.edu