Network Simplex Animations

Slides:



Advertisements
Similar presentations
Outline LP formulation of minimal cost flow problem
Advertisements

MINIMUM COST FLOWS: NETWORK SIMPLEX ALGORITHM A talk by: Lior Teller 1.
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
15.082J and 6.855J and ESD.78J November 4, 2010 The Network Simplex Algorithm.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
and 6.855J The Capacity Scaling Algorithm.
Minimum Cost Flows. 2 The Minimum Cost Flow Problem u ij = capacity of arc (i,j). c ij = unit cost of shipping flow from node i to node j on (i,j). x.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Lagrangean Relaxation
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Network Simplex Animations Network Simplex Animations.
15.082J & 6.855J & ESD.78J September 30, 2010 The Label Correcting Algorithm.
15.082J and 6.855J and ESD.78J Network Simplex Animations.
Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
1 1 Slide © 2005 Thomson/South-Western Chapter 9 Network Models n Shortest-Route Problem n Minimal Spanning Tree Problem n Maximal Flow Problem.
St. Edward’s University
The minimum cost flow problem
Network Simplex Animations
EMIS 8374 Dijkstra’s Algorithm Updated 18 February 2008
Dijkstra’s Algorithm with two levels of buckets
The Network Simplex Method
James B. Orlin Presented by Tal Kaminker
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Introduction to Maximum Flows
Introduction to Maximum Flows
15.082J & 6.855J & ESD.78J Visualizations
Dijkstra’s Algorithm for the Shortest Path Problem
15.082J & 6.855J & ESD.78J Visualizations
Lecture 6 Shortest Path Problem.
Dijkstra’s Algorithm for the Shortest Path Problem
Breadth first search animation
Lecture 4 Graph Search.
Introduction to Minimum Cost Flows
Spanning Tree Algorithms
and 6.855J Flow Decomposition
Primal-Dual Algorithm
Chapter 5 Transportation, Assignment, and Transshipment Problems
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
and 6.855J March 6, 2003 Maximum Flows 2
15.082J & 6.855J & ESD.78J Radix Heap Animation
Network Optimization Depth First Search
Introduction to Algorithms
Min Global Cut Animation
Dijkstra’s Algorithm for Shortest Paths
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Reading before Lecture 13
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Network Optimization Topological Ordering
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
and 6.855J Dijkstra’s Algorithm
Visualizations Dijkstra’s Algorithm
Introduction to Maximum Flows
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
Eulerian Cycles in directed graphs
and 6.855J Topological Ordering
15.082J & 6.855J & ESD.78J Visualizations
The Minimum Cost Spanning Tree Problem
and 6.855J Depth First Search
The Network Simplex Method
Breadth first search animation
OPIM 915 Fall 2010 Data Structures 23-38,
Prim’s algorithm for minimum spanning trees
Introduction to Maximum Flows
Max Flows 3 Preflow-Push Algorithms
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
15.082J & 6.855J & ESD.78J Visualizations
Presentation transcript:

Network Simplex Animations 15.082 and 6.855J Network Simplex Animations Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow problem, the minimum cost flow problem, and the multicommodity flow problem. This will be a very efficient way of introducing the four problems. (Perhaps under 10 minutes of class time.)

Calculating A Spanning Tree Flow A tree with supplies and demands. (Assume that all other arcs have a flow of 0) 1 1 -6 2 7 3 1 3 6 -4 What is the flow in arc (4,3)? 2 4 5 3

Calculating A Spanning Tree Flow To calculate flows, iterate up the tree, and find an arc whose flow is uniquely determined. 1 1 -6 2 7 3 1 3 6 -4 2 What is the flow in arc (5,3)? 2 4 5 3

Calculating A Spanning Tree Flow 1 1 What is the flow in arc (3,2)? -6 2 7 3 1 3 6 -4 2 3 2 4 5 3

Calculating A Spanning Tree Flow 1 1 What is the flow in arc (2,6)? -6 2 7 3 6 1 3 6 -4 2 3 2 4 5 3

Calculating A Spanning Tree Flow 1 1 What is the flow in arc (7,1)? -6 2 7 3 6 4 1 3 6 -4 2 3 2 4 5 3

Calculating A Spanning Tree Flow 1 1 What is the flow in arc (1,6)? 3 -6 2 7 3 6 4 1 3 6 -4 2 3 2 4 5 3

Calculating A Spanning Tree Flow 1 1 Note: there are two different ways of calculating the flow on (1,2), and both ways give a flow of 4. Is this a coincidence? 4 3 -6 2 7 3 6 4 1 3 6 -4 2 3 2 4 5 3

Calculating Simplex Multipliers for a Spanning Tree 1 Here is a spanning tree with arc costs. How can one choose node potentials so that reduced costs of tree arcs is 0? 5 -6 2 7 -4 3 3 6 -2 1 Recall: the reduced cost of (i,j) is cij - i + j 4 5

Calculating Simplex Multipliers for a Spanning Tree There is a redundant constraint in the minimum cost flow problem. 1 5 -6 2 7 One can set 1 arbitrarily. We will let i = 0. -4 3 3 6 -2 1 What is the simplex multiplier for node 2? 4 5

Calculating Simplex Multipliers for a Spanning Tree The reduced cost of (1,2) is c12 - 1 + 2 = 0. Thus 5 - 0 + 2 = 0. 1 5 -6 -5 2 7 -4 3 3 6 -2 1 What is the simplex multiplier for node 7? 4 5

Calculating Simplex Multipliers for a Spanning Tree The reduced cost of (1,2) is c71 - 7 + 1 = 0. Thus -6 - 2 +0 = 0. 1 5 -6 -5 2 7 -4 3 -6 3 6 What is the simplex multiplier for node 3? -2 1 4 5

Calculating Simplex Multipliers for a Spanning Tree 1 5 -6 -5 2 7 -4 3 -6 -2 3 6 What is the simplex multiplier for node 6? -2 1 4 5

Calculating Simplex Multipliers for a Spanning Tree 1 5 -6 -5 2 7 -4 3 -6 -2 3 6 -1 What is the simplex multiplier for node 4? -2 1 4 5

Calculating Simplex Multipliers for a Spanning Tree 1 5 -6 -5 2 7 -4 3 -6 -2 3 6 -1 What is the simplex multiplier for node 5? -2 1 -4 4 5

Calculating Simplex Multipliers for a Spanning Tree These are the simplex multipliers associated with this tree. They do not depend on arc flows, nor on costs of non-tree arcs. 1 5 -6 -5 2 7 -4 3 -6 -2 3 6 -1 -2 1 -4 4 5 -1

Network Simplex Algorithm U 2 -4 2, $4 1 4 4, $2 3, $4 3 4, $2 4, $1 1, $4 3, $5 5, $5 2 5 5 -3 The minimum Cost Flow Problem

Spanning tree flows 2 -4 1 4 3 2 5 5 -3 T L U 2 3 2 5 5 -3 An Initial Spanning Tree Solution

Simplex Multipliers and Reduced Costs -4 1 4 2 3 c45 = 2 3 ? -2 4 2 5 3 -2 What arcs are violating? The initial simplex multipliers and reduced costs

Add a violating arc to the spanning tree, creating a cycle u14, x14 T L U 2, 1 1 4 4,1 3,3 3 4, 0 4,0 1, 0 3,2 5, 3 2 5 What is the cycle, and how much flow can be sent? Arc (2,1) is added to the tree

Send Flow Around the Cycle u14, x14 T L U 2, 1 1 4 4,3 3,3 3 4, 0 4,2 1, 0 3,0 5, 3 2 5 What is the next spanning tree? 2 units of flow were sent along the cycle.

After a pivot u14, x14 T L U 2, 1 1 4 4,3 3,3 3 4, 0 4,2 1, 0 3,0 5, 3 2 5 In a pivot, an arc is added to T and an arc is dropped from T. The Updated Spanning Tree

Updating the Multipliers -4 1 4 2 3 3 4 -2 4 2 5 How can we make cp21 = 0 and have other tree arcs have a 0 reduced cost? 3 -2 The current multipliers and reduced costs

Deleting (2,1) from T splits T into two parts U -4 1 4 2 3 3 4 -2 4 2 5 What value of  should be chosen to make the reduced cost of (2,1) = 0? 3+ -2+ Adding  to nodes on one side of the tree does not effect the reduced costs of any tree arc except (2,1). Why?

The updated multipliers and reduced costs -4 1 4 2 3 3 2 2 2 2 5 Is this tree solution optimal? 1 -4 The updated multipliers and reduced costs

Add a violating arc to the spanning tree, creating a cycle U 2, 1 1 4 4,3 3,3 3 4, 0 4,2 1, 0 3,0 5, 3 2 5 What is the cycle, and how much flow can be sent? Add arc (3,4) to the spanning tree

Send Flow Around the Cycle 2, 2 1 4 4,2 3,2 3 4, 0 4,2 1, 0 3,0 5, 3 2 5 What is the next spanning tree solution? 1 unit of flow was sent around the cycle.

The next spanning tree solution 2, 2 1 4 4,2 3,2 3 4, 0 4,2 1, 0 3,0 5, 3 2 5 Here is the updated spanning tree solution

Updated the multipliers -4 1 4 2 3 3 2 2 2 2 5 How should we modify the multipliers? 1 -4 Here are the current multipliers

Updated the multipliers -4 + 1 4 2 3 3 2 2 2 2 5 What value should  be? 1 -4 Here are the current multipliers

The updated multipliers -6 -2 1 4 3 3 4 2 2 2 5 Is the current spanning tree solution optimal? 1 -4 Here are the updated multipliers.

The Optimal Solution -6 1 4 3 2 5 1 -4 T L U -6 -2 1 4 3 3 4 2 2 2 5 No arc violates the optimality conditions. 1 -4 Here is the optimal solution.

Finding the Cycle 1 8 7 2 3 6 9 12 10 11 5

Use Depth and Predecessor 1 8 7 depth(5) = 4; depth(3) = 2; replace node 5 by pred(5) 2 2 3 6 9 12 10 11 5 4

Use Depth and Predecessor 1 8 7 depth(9) = 3; depth(3) = 2; replace node 9 by pred(9) 2 2 3 6 9 3 12 10 11 5

Use Depth and Predecessor 1 8 7 depth(2) = 2; depth(3) = 2; replace node 2 by pred(2); replace node 3 by pred(3) 2 2 2 3 6 9 12 10 11 5

Use Depth and Predecessor 1 1 1 8 7 depth(8) = 1; depth(7) = 1; replace node 8 by pred(8); replace node 7 by pred(1) 2 3 6 9 12 10 11 5

Use Depth and Predecessor 1 8 7 The least common ancestor of nodes 3 and 5 has been found. 2 3 6 9 12 10 11 5

Updating the multipliers: use the thread and depth 1 Suppose that arc (1,8) will drop out of the tree. What is the subtree rooted at node 8? 8 7 2 3 6 9 12 10 11 5

Follow the thread starting with node 8 1 What is thread(8)? 8 7 2 3 6 9 12 10 11 5

Follow the thread starting with node 8 1 What is thread(3)? 8 7 2 3 6 9 12 10 11 5

Follow the thread starting with node 8 1 What is thread(10)? 8 7 2 3 6 9 12 10 11 5

Follow the thread starting with node 8 1 What is thread(11)? 8 7 2 3 6 9 12 10 11 5

Follow the thread starting with node 8 1 What is thread(6)? 8 7 2 3 6 9 12 10 11 5

The stopping rule Stopping rule: stop when depth(current node)  depth(8) 1 depth = 1 8 7 depth = 1 2 3 6 9 12 10 11 5