multi commodity flows n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Multi commodity  flows PowerPoint Presentation
Download Presentation
Multi commodity  flows

Loading in 2 Seconds...

play fullscreen
1 / 73

Multi commodity  flows - PowerPoint PPT Presentation


  • 120 Views
  • Uploaded on

Multi commodity  flows. Idan Maor Tel Aviv University. interdiction. G=(N,A) is a directed graph capacity for every i,j V: If (i,j)  A then = 0 . k pairs of distinguished vertices, (s1, t1),…(sk, tk). the cost of sending 1 unit of commodity k over ( i ,j).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Multi commodity  flows' - halona


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
multi commodity flows

Multi commodity flows

Idan Maor

Tel Aviv University

interdiction
interdiction
  • G=(N,A) is a directed graph
  • capacity for every i,j V: If (i,j)  A then = 0 .
  • k pairs of distinguished vertices, (s1, t1),…(sk, tk).
  • the cost of sending 1 unit of commodity k over (i,j).
  • the flow of commodity k over (i,j).
example
example

(, ,)

(5,-1,4)

(7,-2,-4)

(10,0,0)

(10,-6,-3)

(4,0,0)

(7,-4,-2)

(5,4,-1)

example1
example

(, ,)

|

(7,-2,-4)

(10,0,0)

(10,-6,-3)

(4,0,0)

(7,-4,-2)

(5,4,-1)

example2
example

(, ,)

|

(7,-2,-4)

(10,0,0)

(10,-6,-3)

(4,0,0)

(7,-4,-2)

|

example3
example

(, ,)

|

|

|

|

(3,0,0)

(4,0,0)

(3,-6,-3)

(7,-4,-2)

|

example4
example

(, ,)

|

|

|

|

|

|

|

|

(4,-4,-2)

|

example5
example

(, ,)

(5,-1,4)

|

|

|

(7,-2,-4)

|

(10,-6,-3)

(10,0,0)

(4,0,0)

|

|

|

(7,-4,-2)

(5,4,-1)

|

=(5*-1)+(7*-2)+(7*-6)+(7*0)+

(5*-1)+(3*-2)+(3*-3)+(3*0)+(3*0)=-85

some observations
Some observations
  • If there is only one commodity the problem is min-cost max flow.
  • We can not use the simple reduction to min cost max flow by adding a super source and a super sink .
  • the flow can be fractional, Even if the cost and capacities are integers.
  • If there is a demand that the flow will be integer, then the problem is NP –Complete.
  • Even for unit capacities, and 2 commodities.
some observations1
Some observations
  • We can not use the simple reduction to min cost max flow by adding a super source and a super sink, even if the all the costs are the same.
  • The solution is 0.

(∞,-1,-1)

(∞,-1,-1)

some observations2
Some observations
  • The solution is - ∞.

(∞,-1)

(∞,0)

(∞,0)

(∞,0)

(∞,0)

(∞,-1)

slide13

the flow can be fractional, Even if the cost and capacities are integers

  • Unit Capacity.
  • Cost is -1.
  • Option 1:

1 unit flow

From s1 to t1.

Result -4.

slide14

the flow can be fractional, Even if the cost and capacities are integers

  • Unit Capacity.
  • Cost is -1.
  • Option 2:

1 unit flow

From s2 to t2.

Result -4.

slide15

the flow can be fractional, Even if the cost and capacities are integers

  • Unit Capacity.
  • Cost is -1.
  • Option 3:

1 unit flow

From s3 to t3.

Result -4.

slide16

the flow can be fractional, Even if the cost and capacities are integers

  • Unit Capacity.
  • Cost is -1.
  • Option 4:

1/2 unit flow

From s1 to t1

From s2 to t2

From s3 to t3

Result -6.

assumptions
Assumptions
  • Homogeneous goods, Each unit of flow of commodity k over (i,j) consume one unit of capacity.
  • No congestion, there is no interaction between the goods meaning the cost is linear in the flow.
  • Indivisible goods, flow can be fractional.
formal definition
Formal definition
  • Min
  • Subject to :
    • (i,j) ϵA
    • (i,j) ϵA
solution approaches
Solution approaches
  • Good news : We can solve the problem using linear programming.
  • Bad News: up to date, there is no other way to solve the problem precisely without using linear programming.
  • All the approaches will be based on linear programming.
solution approaches1
Solution approaches
  • Price-directive decomposition.
    • This approach will remove the bundle constraints( (i,j) ϵA), and by that we decompose the problem to K separated min-cost flow problems.
    • Instead of the constraints this approach “charge“ some price from each commodity for using the arc.
solution approaches2
Solution approaches
  • Resource-directive decomposition.
    • This approach will be based, that every optimal solution for the problem will result by flow on each arc.
    • So we can consider the problem as a resource allocation problem, we will allocate a capacity for each arc and commodity.
    • The problem decompose to K separated min-cost flow problems.
    • This approach start with initial capacity's, and the improve them iteratively.
optimality conditions
Optimality conditions
  • Since the multi commodity flow problem is a linear programming problem we can use the linear programming optimality conditions.
  • The linear programming problem has two constraints:
    • A bundle constraint for every arc. (i,j) ϵA.
    • A mass balance constraint for every node.
  • The dual linear has two types of variables:
    • A price on each arc.
    • A node potential (i) for each node and commodity.
optimality conditions1
Optimality conditions

Using the dual variables the Reduce cost for the problem

  • =+(i)+(j).
  • - is the arc price, it provide linkage between the different reduced costs.
  • (i)- then i node potential for commodity k.
optimality conditions2
Optimality conditions

The dual linear program is :

multi commodity flow complementary slackness conditions
Multi commodity flow complementary slackness conditions
  • Using the dual theorem of linear programming, We get that :
  • The commodity flow optimal if and only if, there exists node potentials (i), and non negataive arc prices such that:
multi commodity flow complementary slackness conditions1
Multi commodity flow complementary slackness conditions
  • The arc prices are the linkage between the different commodity's, if some arc is not saturated then can be equal to 0.
partial dualization
Partial dualization
  • If are optimal flow and are optimal arc prices for the multi commodity problem then for each commodity k, are also the optimal solution for the following incapacitatedmin cost flow problem :
partial dualization1
Partial dualization
  • In the min cost flow problem a solution x* is an optimal solution if and only if there exitsa set of node potentials π, such the reduced costs and flow values satisfy :
partial dualization2
Partial dualization
  • =+(i)+(j).

1)

  • The correctness is due to the fact that and are optimal.
partial dualization3
Partial dualization
  • =+(i)+(j).

2)

  • The correctness is due to the fact that and are optimal.
partial dualization4
Partial dualization
  • =+(i)+(j).

3)

  • The correctness is due to the fact that and are optimal.
partial dualization5
Partial dualization
  • The property of partial dualization, give us a an approach for solving the problem.
  • We first find optimal arc prices and then attempt to find the optimal node potentials and flows by solving the single-commodity minimum cost flow problems.
  • This approach is the Price-directive decomposition.
lagrangian relaxation
Lagrangian Relaxation
  • The multi commodity flow problem:
  • Subject to :
lagrangian relaxation1
Lagrangian Relaxation
  • In order to apply the Lagrangian Relaxation on the multi commodity flow problem , we associate non negative multipliers and create the Lagrangian sub problem:
  • Orequivalently:
  • Subject to :
lagrangian relaxation2
Lagrangian Relaxation
  • Since the sub problem is defined for a given multipliers, the term is constant and we can formulate the sub problem as :
  • The resulting objective function has a cost of associated with every flow variable .
  • Since the constraints contains only one flow variable per commodity, we can decompose the problem to K min cost flow problems.
lagrangian relaxation procedure
Lagrangian Relaxation procedure
  • Solve the min cost flow problem for each of the commodity's, for a fixed lagrangian multiplier, with cost
  • Update the multipliers in the following way:
    • the optimal solution of the min cost flow problem of the last iteration.
    • Max(0, α)
lagrangian relaxation procedure1
Lagrangian Relaxation procedure
  • The scalar is the step size, and it specifies how far we move from the current solution.
  • Notice that the arc prices change the following way:
    • if the total flow we use is greater then the capacity, we raise the arc price.
    • Otherwise we lower the arc price(but keep it non negative).
lagrangian relaxation procedure2
Lagrangian Relaxation procedure
  • Advantages:
    • Using this procedure lets us exploit the underlying network flow structure.
    • The updating of the lagrange multipliers is simple.
    • We can use it partly, for getting a good base for the simplex algorithm.
    • Disadvantages:
      • In order to ensure that the method converge, we need to take small step sizes, and as result it does not converge fast.
      • Since the method is dual based then even if we find the optimal multipliers , is does not promise us that the flow variables are optimal.
column generation approach
Column generation approach

In order to simplify the problem, in this part will add a new assumptions:

  • Each commodity k has a single source and single sink , and a flow requirement .
  • There are no negative cycles in the network.
  • Since there are no negative cycles, there exits an optimal solution such that the flow on each cycle is zero.
reformulation with path flows
Reformulation with Path Flows
  • - the collection of all paths from to , in the network.
  • f(p) – the flow on path pϵ
  • (p) - an arc path indicator variable, that is (p)=1, if arc (i,j)ϵp and (p)=0 otherwise.
  • (p)- the cost of unit flow on path pϵ.
formulation with path flows
formulation with Path Flows
  • Let notice that :

(p)=(p) =

  • We can write each flow variable as decomposition of path flow:

=.

  • So we can represent the objective function in the terms of path flows:

=

[]=

.

formulation with path flows1
formulation with Path Flows
  • The path flow linear program:
formulation with path flows2
formulation with Path Flows
  • The path flow formulation has one constraint per arc :
  • The path flow formulation has one constraint for each commodity:
  • The path flow can have an exponential number of variables, since there is a variable for each path in the graph.
arc formulation vs path formulation
Arc formulation Vs Path formulation

The exponential number of variables are not a pitfall for this approach, since the linear pogromming structure promise us that there exits an optimal solution with at most m+ K paths .

there is no need to represents all the columns (paths), all the time we can use lazy approach and generate only when nodded.

optimality conditions3
Optimality conditions
  • We will use the linear programming problem optimality conditions.
  • the path flow formulation has one bundle constraint for each arc, the dual linear program will have The arc price .
  • the path flow formulation has one demand constraint for each commodity, the dual linear program will have for each commodity.
  • Using the dual variables we can define the reduce cost for the path flow formulation as :

=+

path flow complementary slackness conditions
Path flow complementary slackness conditions
  • The commodity path flow f(p) optimal if and only if, there exists commodity prices and arc prices such that:
path flow complementary slackness conditions1
Path flow complementary slackness conditions
  • The condition:

Just state that if we don’t use the total capacity of some arc, then the arc price can be zero.

  • From ,we can understand that every path p in the basis satisfies =0. Since
  • So we get every path p in the basis :
path flow complementary slackness conditions2
Path flow complementary slackness conditions

From , we get that :

  • is the shortest path from node to with respect to the modified costs .
  • in the optimal solution every path p that carries a flow from node to must be the shortest path with respect to the modified costs.
  • With this result we can decompose the multi commodity problem to independent shortest path problems.
high level description of the simplex algorithm
High level description ofthe simplex algorithm
  • Select a basis B that defines a bfs(basic feasible solution).
  • Calculate the objective function value of this bfs.
  • If there exits a variable that is not in the basis and can lower the objective function value
    • then chose it, and increase it until a variable that is the base reach to zero.
    • Stop and return the solution.
some observations about the simplex algorithm
Some observations aboutthe simplex algorithm
  • The simplex method maintains a basis B at each iteration.
  • Using the basis B it defines a set of multipliers π(in our case they are and ), such that πB = (matrix notion).
  • The method define the simplex multipliers so the reduce cost of the basic variables will be equal to zero(=- πB).
  • It’s easy to see that we don’t require information about variables that are not in the base in order to calculate the multipliers.
column generation solution procedure
Column Generation Solution Procedure
  • To use the Colum generation approach we need to show, how to enter a non basic variable to the basis without examine every Colum.
  • Since the simplex algorithm maintain the multipliers and such the reduce cost of every basic variable is zero =0 , we just need to check if there exits a path that it cost with respect to the modified costs is negative.
  • if there exits such a path we can return the path and enter it to the base, otherwise the solution is optimal.
column generation solution procedure1
Column Generation Solution Procedure
  • We can find such path easily by running a shortest path algorithm for each commodity k, with respect to the modified costs .
  • If there is no path that it’s length is negative then we are done, else we found a path and we will enter it as the new variable and recalculate the appropriate new multipliers and such the reduce cost of every basic variable is zero =0 .
  • The rest of the steps are the same as in the simplex algorithm.
column generation solution procedure2
Column Generation Solution Procedure
  • Claim: the solution is optimal if all the paths length in the network with respect to the modified costs are non negative.
  • Proof : the solution is optimal if it stratify the complementary slackness.
column generation solution procedure3
Column Generation Solution Procedure
  • it’s easy to see that this condition is satisfied since the reduce cost ()of all paths in the base is zero, and the flow(f(p)) on the paths that are not in the base is zero.
  • This is the assumption of the claim.
column generation solution procedure4
Column Generation Solution Procedure
  • Let look on the slack variable , this variable state how much of the capacity of the edge is used, i.e. ].
  • If is not the base then = 0(variables that are not in the base are equal to 0).
  • otherwise is in the base and its reduce cost is 0- equal to 0, so we get that =0.
resource directive decomposition
Resource-Directive Decomposition
  • In The resource directive decomposition approach, we will allocate an individual capacity for each commodity per arc. the resulting resource directive problem:
resource directive decomposition1
Resource-Directive Decomposition
  • Lets define r=() to be the resource allocation vector.
  • The resource directive problem is equivalent to the multi commodity problem in the sense that :
    • If (x,r) is feasible in the resource directive problem then x is a feasible solution for the multi commodity problem and both problems has the same objective function value.
    • If x is a feasible solution for the original problem and we set r=x, we will get a solution at least as good as in the resource directive problem.
resource directive decomposition2
Resource-Directive Decomposition
  • r=() to be the resource allocation vector.
  • Let’s define the resource allocation problem using r:
resource directive decomposition3
Resource-Directive Decomposition
  • It’s easy to see that for a fixed value of resource vector r, the resource directive problem decompose to K independent network min cost max flow problems.
  • z(r) =min
  • The value of of the k sub problem :
resource directive decomposition4
Resource-Directive Decomposition
  • The resource directive problem to the resource allocation problem in the sense that :
    • If (x,r) is feasible in the resource directive problem , then r is feasible in the resource allocation problem and .
    • If r is a feasible in the resource allocation problem then for some vector x, (x,r) is a feasible solution for the resource directive problem and z(r)=cx.
resource directive decomposition5
Resource-Directive Decomposition

If (x,r) is feasible in the resource directive problem , then r is feasible in the resource allocation problem and .

Proof:

it’s easy to see that if (x,r) is feasible in the resource directive problem then r is also feasible in the resource allocation problem, since the problems share the same resources contrarians

For the second part since x is feasible for every commodity we get :

z(r) = ≤.

According to the definition of the recourse allocation problem.

resource directive decomposition6
Resource-Directive Decomposition

If r is a feasible in the resource allocation problem then for some vector x, (x,r) is a feasible solution for the resource directive problem and z(r)=cx.

Proof:

If r is a feasible solution for the resource allocation problem then by the definition of =cx for some vector x.

So x there a vector x that satisfies z(r)=c(x).

resource directive decomposition7
Resource-Directive Decomposition
  • From the previous property we can conclude that instead of solving the multi commodity problem we can solve the resource allocation problem by having a problem with simple constrains but a complex objective function z(r).
  • Although the objective function z(r) is complicated it’s easy to calculate, for a fixed vector r we only need to compute the K min cost max flow problems.
  • The objective function of the resource allocation problem z(r) is piecewise linear convex function of r.
  • Both properties(the convexity and the piecewise linearity), derived from the fact that the resource allocation is a special case of linear programing.
solving the resource directive model
Solving the Resource-Directive Model
  • Since the objective function is non differentiable we can not use gradient optimization methods.
  • Instead we could use heuristic methods such as “one arc at a time”, i.e. adding 1 unit to and subtracting 1 unit from This is a simple approach but it’s does not promise convergence.
  • We can view the changing of the resource allocation of r as: r=r+θϒ. that is a step size θ in a direction ϒ=().
solving the resource directive model1
Solving the Resource-Directive Model
  • Similar to sub gradient optimization we would like to choose a step size θ in a direction ϒsuch that promise :
    • Feasibility.
    • Convergence to the optimal solution.
  • in order to achieve this goals we will use a two steps approach:
    • We will find a sub gradient direction and a step size that will ensure convergence.
    • If moving to r+θϒ, will make solution non feasible we will transform it to a point r’ that will be feasible.
finding a sub gradient of z r
Finding a sub gradient of z(r).

a sub gradient ϒ of z(r) at point r= is any vector that satisfies )+ϒ(r-).

For all with

- the set of all resource allocations for commodity k, such that the sub problem is feasible .

finding a sub gradient of z r1
Finding a sub gradient of z(r).

Claim :

l be a sub gradient of at the point , then =(,,….,) is a sub gradient of z(r) at =(, , ….).

Proof:

  • Since is a sub gradient of , )+(-), .
  • z(r) =
finding a sub gradient of
Finding a sub gradient of .

Lets look on the network flow problem:

, q is a vector of upper bounds on the arc flows.

the optimal solution when =q.

={

Claim:

For any non negative vector q’,for which the problem is feasible, (q’-).

i.e. is a sub gradient of the objective function.

finding a sub gradient of1
Finding a sub gradient of .

Proof:

According to the definition of reduce cost cx=

==.

The last equality follows from the optimality condition :

=0 if And the definition of

={

finding a sub gradient of2
Finding a sub gradient of .

Proof:

Let x’ be the solution of the problem when q=q’.

Then =q’.

Since and .

We got :

q’

=

++q’

+(q’).

converting a non feasible solution
Converting a non feasible solution

After receiving the new resource allocation vector r, we need to verify the feasibility.

If it’s not feasible we need to move to another point r’ in order to preserve the feasibility.

one approach that ensures that the algorithm converges is to choose the closet point to r, in the sense to minimize

conclusion
Conclusion

We can solve the problem in the following way :

  • Solve the k min cost max flow problem with the current resource allocation.
  • Find the sub gradient of the resource allocation according to the sub gradient of each of the min cost max flow problems.
  • Update the resource allocation according to r=r+ϒθ.
  • If the new resource allocation is feasible, continue with it, otherwise move to the point r’ that is closet feasible point to r.