28
CSCI7000-016: Optimization and Control of Networks Minimum Cost Flows Lijun Chen 01/26/2016

Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

CSCI7000-016: Optimization and Control of Networks

Minimum Cost Flows

Lijun Chen 01/26/2016

Page 2: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Agenda

❒  Graph, path, and flow ❒  Minimum cost flow problem and applications q  Generalized cost flow problem q  Discussion on algorithms

2

Page 3: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Directed graph

3

ts

i

j

A Graph G = (N,L)

•  A link (i, j) is an ordered pair, from i to j •  (i, j) is to be distinguished from (j, i)

Page 4: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Path and cycle

4

•  A sequence of nodes , k>=2 •  A sequence of k-1 links, with either forward link or backward link the i-th link

(n1,n2,,nk )

(ni,ni+1)

A path P

(ni+1,ni )

Page 5: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Path and cycle

5

•  A cycle if the start and end nodes are the same •  Simple path if no repeated links or nodes

Page 6: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Flow and divergence

6

i

j

xij

•  Link flow

•  Divergence

•  A source (sink) if ( ) •  A circulation if

xijyi = xij

j|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑

yi > 0 yi < 0

yi = 0

Page 7: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Flow constraint and unblocked path

7

i

j

xij cij

•  Link capacity

•  Flow constraint

•  A path P is unblocked if the flow constraint is not tight at every link of the path

cij0 ≤ xij ≤ cij

Page 8: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Flow, capacity, cost/weight

8

A Graph G = (N,L)

xij

ciji

j

aij

•  Flow •  Capacity •  Cost/weight

Page 9: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Cost/weight

q Monetary cost for using the link q Performance metrics such as delay, packet loss q Resource consumed such as power q Negative of the “benefit” such as throughput q ……

9

Page 10: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Min-cost flow problem

Find a feasible flow vector x to minimize a linear cost function, subject to the constraints that it produces a given divergence vector s:

10

minimizex≥0

aij xij(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = si, i ∈ N

xij ≤ cij, (i, j)∈ L Link flow constraint

Conservation of flow

Page 11: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Min-cost flow problem

11

minimizex≥0

aij xij(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = si, i ∈ N

xij ≤ cij, (i, j)∈ L

•  A flow vector is feasible if it satisfies both of these constraints. •  The min-cost problem is feasible if there is at least one feasible flow vector. •  Constraints can be more general.

Page 12: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Applications

12

Page 13: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Maximum flow problem

13

i

j

xij

s txs

maxx≥0

xssubject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = 0, i ∈ N / s, t{ }

xsjj|(s, j )∈L{ }∑ = x jt

j|( j,i)∈L{ }∑ = xs

xij ≤ cij, (i, j)∈ L

cij

Page 14: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

14

s txs

minx≥0

-xtssubject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = 0, i ∈ N \ s, t{ }

xsjj|(s, j )∈L{ }∑ = x jt

j|( j,i)∈L{ }∑ = xts

xij ≤ cij, (i, j)∈ L

ats = −1

Page 15: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Shortest path problem

Define the cost of a forward path P to be the sum of the costs of its links. Given two nodes s and t, SPP is to find a forward path from s to t with min cost.

15

minP

aij(i, j )∈P∑

subject toP is a forward path from s to t

Page 16: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

16

s t

minx≥0

aij xij(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ =

1, if i = s−1, if i = t

0, otherwise

%

&'

('

xij =1, if (i, j)∈ P0, otherwise

%&'

('

Page 17: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Assignment problem

17

1

i

1

n n

jaij

1

1

1

1

1

1

minx≥0

- aij xij(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ =1; xij

i|(i, j )∈L{ }∑ =1

xij =1, if job i assigned to server j

0, otherwise

$%&

'&

Page 18: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

18

1

i

1

n n

jaij

1

1

1

1

1

1

maxx≥0

aij xij(i, j )∈L∑

subject to

xijj|(i, j )∈Li{ }∑ =1; xij

i|(i, j )∈Lj{ }∑ =1

xij =1, if job i assigned to server j

0, otherwise

$%&

'&

Page 19: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Applications

19

1

i

1

n n

jaij

1

1

1

1

1

1

•  Office assignment •  Routing at front-end server •  Routing in a switch

•  Wireless scheduling

•  ……

Page 20: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Convex cost flow problem

Associated a convex cost function fij(xij) with each link (i, j).

20

minimizex≥0

fij (xij )(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = si, i ∈ N

xij ≤ cij, (i, j)∈ L

Page 21: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Matrix balancing problem

To find a matrix X that has given row sums and column sums, and approximates a given matrix M in certain optimal manner.

21

minimizex≥0

wij (xij −mij )2

(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ = ri

xiji|(i, j )∈L{ }∑ = cj

Page 22: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Multicommodity flow problem

There is a set M of end-to-end flows, each with a supply of rm, and source sm and sink tm.

22

minimizex≥0

fij ( xijm

m∈M∑ )

(i, j )∈L∑

subject to

xijm

j|(i, j )∈L{ }∑ − x ji

m

j|( j,i)∈L{ }∑ =

rm, i = sm−rm, i = tm

0, otherwise,m ∈M

%

&''

(''

xijm

m∈M∑ ≤ cij, (i, j)∈ L (Aggregate) flow constraints

Conservation of each flow

Page 23: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

What else can be optimized?

23

Page 24: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Utility maximization problem

Associated each flow a concave utility function Um(rm) with each flow .

24

maximizer,x

Um (rm )m∈M∑

subject to

xijm

j|(i, j )∈L{ }∑ − x ji

m

j|( j,i)∈L{ }∑ =

rm, i = sm−rm, i = tm

0, otherwise, m ∈M

$

%&&

'&&

xijm

m∈M∑ ≤ cij, (i, j)∈ L

m ∈M

Page 25: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Optimize both network cost and utility

25

maximizer,x

Um (rm )m∈M∑ −β fij ( xij

m )m∈M∑

(i, j )∈L∑

subject to

xijm

j|(i, j )∈L{ }∑ − x ji

m

j|( j,i)∈L{ }∑ =

rm, i = sm−rm, i = tm

0, otherwise, m ∈M

$

%&&

'&&

xijm

m∈M∑ ≤ cij, (i, j)∈ L

Page 26: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

General problem

Algorithms

q  Primal cost improvement q  Dual cost improvement q ……

26

maximizer,x

f (r, x)

subject to (r, x)∈ F

Page 27: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Distributed algorithm

❒  Structure and properties of the objective

functions q  Additive, submodular, …

❒  Structure of the constraints q  Coupling between decision variables, …

27

minimizex≥0

fij (xij )(i, j )∈L∑

subject to

xijj|(i, j )∈L{ }∑ − x ji

j|( j,i)∈L{ }∑ = si, i ∈ N

xij ≤ cij, (i, j)∈ L

Page 28: Minimum Cost Flows - University of Colorado Boulderlich1539/fn/MinCostFlows2016.pdfGraph, path, and flow Minimum cost flow problem and applications q Generalized cost flow problem

Comments

❒  Network design and control problems are special cases or extension

❒  Distributed optimization decomposition to guide distributed algorithm design

28