math models of or: multicommodity network flow...
TRANSCRIPT
Math Models of OR:Multicommodity Network Flow Problems
John E. Mitchell
Department of Mathematical SciencesRPI, Troy, NY 12180 USA
November 2018
Mitchell Multicommodity Network Flow Problems 1 / 16
Introduction
Outline
1 Introduction
2 Arc-based formulation
3 A path-based formulation
Mitchell Multicommodity Network Flow Problems 2 / 16
Introduction
Multiple commodities
A network may be shared by many different services or commodities.For example:
telephone network: each call is a commodity with its own sourceand sinktransportation network: each trip is its own commoditysupply chain: different goods move through the network
Mitchell Multicommodity Network Flow Problems 3 / 16
Introduction
Multiple commodities
A network may be shared by many different services or commodities.For example:
telephone network: each call is a commodity with its own sourceand sinktransportation network: each trip is its own commoditysupply chain: different goods move through the network
Mitchell Multicommodity Network Flow Problems 3 / 16
Introduction
Multiple commodities
A network may be shared by many different services or commodities.For example:
telephone network: each call is a commodity with its own sourceand sinktransportation network: each trip is its own commoditysupply chain: different goods move through the network
Mitchell Multicommodity Network Flow Problems 3 / 16
Introduction
Example
Mitchell Multicommodity Network Flow Problems 4 / 16
Introduction
Example
Commodity A
Mitchell Multicommodity Network Flow Problems 4 / 16
Introduction
Example
Commodity B
Commodity A
Mitchell Multicommodity Network Flow Problems 4 / 16
Introduction
Example
Commodity B
Commodity A
Commodity C
Mitchell Multicommodity Network Flow Problems 4 / 16
Introduction
Example
Commodity B
Commodity A
Commodity C
congested
Mitchell Multicommodity Network Flow Problems 4 / 16
Introduction
Node-arc incidence matrixThe network can be directed or undirected.
We’ll assume it is a directed network D = (V ,E) and let A denote thenode-arc incidence matrix. So A has one row for each node, onecolumn for each arc, and one +1 and one −1 in each column.
1
2
3
4
Node 1: Supply 10Nodes 2, 3: TransshipmentNode 4: Demand 10
A =
x12 x13 x23 x24 x341 1 0 0 0−1 0 1 1 0
0 −1 −1 0 10 0 0 −1 −1
v1v2v3v4
Ax =
10
00
−10
Mitchell Multicommodity Network Flow Problems 5 / 16
Introduction
Parameters
We have K commodities, each with its own sources and sinks.
The vector bk gives the net demand at each node for commodity k .
Transporting one unit of commodity k on arc (i , j) ∈ E costs ckij .
Each arc (i , j) ∈ E has a capacity uij .
The total amount shipped through arc (i , j) ∈ E of all the commoditiesmust be no larger than uij .
Without this shared bound, the problem would separate: we couldsolve separate min cost network flow problems for each commodity.
Mitchell Multicommodity Network Flow Problems 6 / 16
Introduction
Formulations
We’ll give two formulations: an arc-based formulation and apath-based formulation.
Each formulation can be modified straightforwardly to handle the casethat the network is undirected.
For more details, see for example Chapter 17 of the text by Ahuja,Magnanti, and Orlin, Network Flows, Prentice Hall, 1993.
Mitchell Multicommodity Network Flow Problems 7 / 16
Arc-based formulation
Outline
1 Introduction
2 Arc-based formulation
3 A path-based formulation
Mitchell Multicommodity Network Flow Problems 8 / 16
Arc-based formulation
An arc-based formulation
We let xkij denote the amount of commodity k shipped on arc (i , j) ∈ E .
The arc-based LP formulation for the multicommodity network flowproblem is:
minx∈IR|E|×K∑K
k=1
(∑(i,j)∈E ck
ij xkij
)subject to Axk = bk flow conservation∑K
k=1 xkij ≤ uij ∀(i , j) ∈ E arc capacity
x ≥ 0
Without the shared capacity constraint, we’d have separate problemsfor each commodity.
Even if all the data is integer, this problem may well have a fractionaloptimal solution, in contrast with the single commodity case.
Mitchell Multicommodity Network Flow Problems 9 / 16
Arc-based formulation
An arc-based formulation
We let xkij denote the amount of commodity k shipped on arc (i , j) ∈ E .
The arc-based LP formulation for the multicommodity network flowproblem is:
minx∈IR|E|×K∑K
k=1
(∑(i,j)∈E ck
ij xkij
)subject to Axk = bk flow conservation∑K
k=1 xkij ≤ uij ∀(i , j) ∈ E arc capacity
x ≥ 0
Without the shared capacity constraint, we’d have separate problemsfor each commodity.
Even if all the data is integer, this problem may well have a fractionaloptimal solution, in contrast with the single commodity case.
Mitchell Multicommodity Network Flow Problems 9 / 16
Arc-based formulation
Size of the formulation
Let n = |E | and m = |V |.
The arc-based formulation has nK variables and n + mK constraints(excluding nonnegativity constraints).
For example, in a graph with 1000 nodes and 5000 arcs and with onecommodity for each pair of nodes, we have on the order of 109
variables and constraints.
In principle, the problem can be solved using an LP solver, but inpractice the size of the problem can be daunting.
Mitchell Multicommodity Network Flow Problems 10 / 16
A path-based formulation
Outline
1 Introduction
2 Arc-based formulation
3 A path-based formulation
Mitchell Multicommodity Network Flow Problems 11 / 16
A path-based formulation
A path-based formulation
We assume all the costs ckij are nonnegative, so in particular there are
no negative length cycles.
Any feasible flow in commodity k can be represented as a sum of flowson paths.
We assume each commodity has a single source sk and a singlesink tk ; this can be done without loss of generality, by introducing asupersource and/or a supersink for each commodity and constructingcapacities and costs appropriately for the edges linking thesupersource to the sources and the sinks to the supersink.
Mitchell Multicommodity Network Flow Problems 12 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Node s: Supply 10Node 2: Demand 10
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s24t cost: cks24t = 2 + 1 + 6 = 9
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s3t cost: cks3t = 6 + 3 = 9
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s243t cost: cks243t = 2 + 1 + 2 + 3 = 8
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s324t cost: cks324t = 6 + 5 + 1 + 6 = 18
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s24t cost: cks24t = 2 + 1 + 6 = 9
Path s3t cost: cks3t = 6 + 3 = 9
Path s243t cost: cks243t = 2 + 1 + 2 + 3 = 8
Path s324t cost: cks324t = 6 + 5 + 1 + 6 = 18
meet demand:f ks24t + f k
s3t + f ks243t + f k
s324t = 10
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s24t cost: cks24t = 2 + 1 + 6 = 9
Path s3t cost: cks3t = 6 + 3 = 9
Path s243t cost: cks243t = 2 + 1 + 2 + 3 = 8
Path s324t cost: cks324t = 6 + 5 + 1 + 6 = 18
capacity constraint for (2,4):f ks24t + f k
s243t + f ks324t ≤ u24
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
A set of paths for commodity k
sk
2
3
4
tkc12 = 2
c13 = 6
c24 = 1
c 32=
5
c35 = 3
c43 = 2c45
= 6
Path s24t cost: cks24t = 2 + 1 + 6 = 9
Path s3t cost: cks3t = 6 + 3 = 9
Path s243t cost: cks243t = 2 + 1 + 2 + 3 = 8
Path s324t cost: cks324t = 6 + 5 + 1 + 6 = 18
capacity constraint for (2,4):f ks24t + f k
s243t + f ks324t ≤ u24
also add in flows for other commodities
Mitchell Multicommodity Network Flow Problems 13 / 16
A path-based formulation
Each commodity has a set of possible paths
We let dk ∈ IR denote the (scalar) demand for commodity k and we letPk denote the set of all paths from the source for commodity k to thesink for commodity k . Each path p ∈ Pk has a cost per unit shipped:
ckp =
∑(i,j)∈p
ckij .
We define an indicator parameter to capture which edges are on apath p:
δij(p) =
{1 if (i , j) ∈ p0 otherwise
Our variables are f kp for each p ∈ Pk , for each k = 1, . . . ,K , which
gives the amount of commodity k shipped on path p.
Mitchell Multicommodity Network Flow Problems 14 / 16
A path-based formulation
The formulation
The path-based formulation of the multicommodity problem is then:
minf∑K
k=1
(∑p∈Pk ck
p f kp
)subject to
∑p∈Pk f k
p = dk for k = 1, . . . ,K demand∑Kk=1
∑p∈Pk δij(p)f k
p ≤ uij ∀(i , j) ∈ E capacity
f kp ≥ 0 ∀p ∈ Pk , k = 1, . . . ,K
The path-based formulation has n + K constraints (excludingnonnegativity constraints). For the earlier numbers of 1000 nodes and5000 arcs and with one commodity for each pair of nodes, this resultsin on the order of 106 constraints.
Mitchell Multicommodity Network Flow Problems 15 / 16
A path-based formulation
VariablesThe drawback is that the path-based formulation has an exponentialnumber of variables. Since, we have an exponential number ofpossible paths for any one commodity, in the worst case.
Thus, the paths are not all enumerated a priori; instead, they aregenerated as needed.
They can be found by solving shortest path problems.
To check optimality:Check every primal variable (that is, every path) has anonnegative reduced cost.So check dual feasibility. Each dual constraint corresponds to adifferent path.Can find the most violated dual constraint for commodity k bysolving a shortest path problem: edge weights are the originalweights, with an adjustment representing the congestion on theedges.
Mitchell Multicommodity Network Flow Problems 16 / 16
A path-based formulation
VariablesThe drawback is that the path-based formulation has an exponentialnumber of variables. Since, we have an exponential number ofpossible paths for any one commodity, in the worst case.
Thus, the paths are not all enumerated a priori; instead, they aregenerated as needed.
They can be found by solving shortest path problems.
To check optimality:Check every primal variable (that is, every path) has anonnegative reduced cost.So check dual feasibility. Each dual constraint corresponds to adifferent path.Can find the most violated dual constraint for commodity k bysolving a shortest path problem: edge weights are the originalweights, with an adjustment representing the congestion on theedges.
Mitchell Multicommodity Network Flow Problems 16 / 16
A path-based formulation
VariablesThe drawback is that the path-based formulation has an exponentialnumber of variables. Since, we have an exponential number ofpossible paths for any one commodity, in the worst case.
Thus, the paths are not all enumerated a priori; instead, they aregenerated as needed.
They can be found by solving shortest path problems.
To check optimality:Check every primal variable (that is, every path) has anonnegative reduced cost.So check dual feasibility. Each dual constraint corresponds to adifferent path.Can find the most violated dual constraint for commodity k bysolving a shortest path problem: edge weights are the originalweights, with an adjustment representing the congestion on theedges.
Mitchell Multicommodity Network Flow Problems 16 / 16