01.2 - The min-cost flow problem - from slides - MM

01.2 - The min-cost flow problem - from slides - MM

A network like the one below is given:

01.2 - The min-cost flow problem 2024-10-10 15.09.46.excalidraw.png

The same network, can also be described through 6 linear equations:

{Nodo 1: x1x8=10Nodo 2: x1+x2+x4+x5+x7=12Nodo 3: x2+x3=0Nodo 4: x3x4x5+x9x10=13Nodo 5: x5+x6=0Nodo 6: x7+x8x9+x10=15

or in matrix form:

[100000010011011010000110000000001110001100001100000000001111][x1x2x3x4x5x6x7x8x9x10]=[1012013015]
observation

Notice how the 6 equations are not linearly indipendent. One equation can be removed as it originates from the others. We same the system is overdetermined.

The flow vector, x, is unknown.

Given we have more unknown variables than equations, the solution won't be unique.

Problem definition

min-cost problem

The min-cost problem consists in finding the solution, or solutions, that minimize the cost of moving units across a network.

Let:

  • A= Node-link incidence matrix
  • x= flow vector (decision variables)
  • b= injections/extractions vector
  • l,u= lower and upper bounds vectors
  • c= Is the vector cost: it assigns a cost value to every link

Objective Function:
Z(x)=cTx


The problem is:
minxZ(x)
Subject to:
Ax=blijxijuij

Usually, lij=0(i,j). If this is not the case, it is easy to reformulate the problem defining a new flow vector y

y=xl

Typically, cij0.

Problem solution

Basic Feasible Solution

In a min-cost flow problem, a Basic Feasible Solution is a solution to the problem that follows the following conditions.

Set IB

IB={Links whose flow can be 0xijuij and contains all link with flow 0<xij<uij}

Let N be the number of nodes, the set IB must have cardinality:

|IB|=N1

Moreover, links in IB must make up a spanning tree.

All other links need to go in one of the following sets: IN or IN/IN+.

If the problem is unbounded (uij>), all remaining links (i,j), with flow xij=0 go into IN:

IN={In unbounded problem, all links with flow xij=0}

If the problem is bounded, we need to split all remaining links in one fo the two sets:

IN+={All links whose flow xij=uij}IN={All links whose flow xij=0}

Optimal solution

In order to define a #Condition of optimality we first need to introduce two concepts:

The optimal solution to the The min-cost flow problem can be found through the The SIMPLEX Method

Dual variable

A dual variable is a value λr that tells what is the unit cost of moving from a predefined root node to any node r in the network.

  1. Choose one node as the root node, i=O
  2. λr=0cO,r
  3. The value of the dual variable at node r is the difference between the value of the dual variable of the previous node of the spanning tree and the cost of the link from the previous node to r
Reduced cost

The reduced cost (rij) of link (i,j) is an index that tells of how much the unit cost of the network would go down or up if link (i,j) was added to the solution.

The reduced cost can be calculated as:

rij=cij(λiλj)

Condition of optimality

necessary condition of optimality

If a solution to the min-cost flow problem is optimal than:
{rij=0(i,j)IBrij0(i,j)IN+rij0(i,j)IN or IN

This means that, if one of the conditions above is not met by our solution, we can say that the solution is not optimal.

Finding the optimal solution

The SIMPLEX Method

Link to chapter: Intrudoction to Operations Research - MM, page 114

The SIMPLEX method is a general procedure for solving linear programming problems. It' very efficient and it is used routinely to solve huge problems on today's computers.

Basic feasible solution

Each problem defined as in #Problem definition, has many possible solutions. We are interested in some specific ones, called basic feasible solutions.

Let there be a graphgraph G=(N,A). Let xij with (i,j)A be a feasible flow of given graph.

The solution, xij is a basic feasible solution if it falls under the following conditions:
0. It's feasible

  1. We can build a set, IB, so that |IB|=|N|1 containing links where the flows in the graph are equal to:
    • xi,j=0xi,j=ui,j0<xi,j<ui,j
  2. IB constitutes a spanning tree
  3. We put every other null or upper bound flow in other sets, IN or IN+IN

where:

IN, IN+ and IN don't have to contain all the links.

Given this graph:

01.2 - The min-cost flow problem 2024-10-10 15.09.46.excalidraw.png

We can define IB as

IB=(1,2),(2,3),(2,5),(3,4),(6,1)

01.2 - The min-cost flow problem - MM 2024-10-24 14.05.20.excalidraw.png

Notice that:

|IB|=61=5

and that the links in IB form a spanning tree.

There is no upper bound so we only need IN and it will contain all the other links with flow equal to 0.

Once we select a spanning tree, we can make an incidence matrix of just the spanning tree. In this case, we'll get:

[1000111010011000010000001]

Notice that the system above is not linearly independent. So, we can remove the last row and we get:

B=[10001110100110000100]

❗❗❗❗❗❗❗❗❗❗❗❗
❗❗❗ COMPLETARE ❗❗❗
❗❗❗❗❗❗❗❗❗❗❗❗

From slide 17 to end of pdf.