You are on page 1of 30

Network Flow Problems

Dr. Ramesh Krishnan


IIM Kozhikode.
Ramesh.Krishnan@iimk.ac.in
Distribution Unlimited Co.
Problem
• The Distribution Unlimited Co. has two factories producing a
product that needs to be shipped to two warehouses
• Factory 1 produces 80 units.
• Factory 2 produces 70 units.
• Warehouse 1 needs 60 units.
• Warehouse 2 needs 90 units.
• There are rail links directly from Factory 1 to Warehouse 1 and
Factory 2 to Warehouse 2.
• Independent truckers are available to ship up to 50 units from
each factory to the distribution center, and then 50 units from
the distribution center to each warehouse.
Question: How many units (truckloads) should be shipped 6.2
along each shipping lane?
The Distribution Network

80 units F1 W1 60 units
produced needed

DC

70 units W2 90 units
F2
produced needed

6.3

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Data for Distribution Network

80 units $700/unit 60 units


produced F1 W1 needed
$300/unit $200/unit
[50 units max.] [50 units max.]
DC
[50 units max.] [50 units max.]
$500/unit $400/unit
70 units $1,000/unit 90 units
produced F2 W2 needed

6.4

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of
McGraw-Hill Education.
A Network Model
[80] [- 60]
$700
F1 W1
$300 $200
[50] [0] [50]
DC
$500 $400
[50] [50]
$1,000
F2 W2
[70] [- 90]

6.5

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of
McGraw-Hill Education.
Terminology for Minimum-Cost
Flow Problems
1. The model for any minimum-cost flow problem is represented by a
network with flow passing through it.
2. The circles in the network are called nodes.
3. Each node where the net amount of flow generated (outflow minus
inflow) is a fixed positive number is a supply node.
4. Each node where the net amount of flow generated is a fixed
negative number is a demand node.
5. Any node where the net amount of flow generated is fixed at zero is
a transshipment node. Having the amount of flow out of the node
equal the amount of flow into the node is referred to as
conservation of flow.
6. The arrows in the network are called arcs.
7. The maximum amount of flow allowed through an arc is referred to
as the capacity of that arc. 6.6

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Assumptions of a Minimum-Cost
Flow Problem
1. At least one of the nodes is a supply node.
2. At least one of the other nodes is a demand node.
3. All the remaining nodes are transshipment nodes.
4. Flow through an arc is only allowed in the direction indicated by the
arrowhead, where the maximum amount of flow is given by the
capacity of that arc. (If flow can occur in both directions, this would be
represented by a pair of arcs pointing in opposite directions.)
5. The network has enough arcs with sufficient capacity to enable all the
flow generated at the supply nodes to reach all the demand nodes.
6. The cost of the flow through each arc is proportional to the amount of
that flow, where the cost per unit flow is known.
7. The objective is to minimize the total cost of sending the available
supply through the network to satisfy the given demand. (An
alternative objective is to maximize the total profit from doing this.) 6.7

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Properties of Minimum-Cost
Flow Problems
• The Feasible Solutions Property: Under the previous
assumptions, a minimum-cost flow problem will have feasible
solutions if and only if the sum of the supplies from its supply
nodes equals the sum of the demands at its demand nodes.
• The Integer Solutions Property: As long as all the supplies,
demands, and arc capacities have integer values, any minimum-
cost flow problem with feasible solutions is guaranteed to have
an optimal solution with integer values for all its flow
quantities.

6.8

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Spreadsheet Model

Net Flow
=SUMIF(From,I4,Ship)-SUMIF(To,I4,Ship)
=SUMIF(From,I5,Ship)-SUMIF(To,I5,Ship)
=SUMIF(From,I6,Ship)-SUMIF(To,I6,Ship)
=SUMIF(From,I7,Ship)-SUMIF(To,I7,Ship)
=SUMIF(From,I8,Ship)-SUMIF(To,I8,Ship) 6.9

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
The Optimal Solution
[80] [- 60]
(30)
F1 W1
(50) (30)
[0]

DC
(30) (50)
(40)
F2 W2
[70] [- 90]

6.10

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
The SUMIF Function
• The SUMIF formula can be used to simplify the node flow
constraints.
=SUMIF(Range A, x, Range B)
• For each quantity in (Range A) that equals x, SUMIF sums the
corresponding entries in (Range B).
• The net outflow (flow out – flow in) from node x is then
=SUMIF(“From labels”, x, “Flow”) – SUMIF(“To labels”, x,
“Flow”)

6.12

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Typical Applications of Minimum-Cost Flow Problems

Kind of Supply Transshipment Demand


Application Nodes Nodes Nodes

Operation of a Intermediate storage


Sources of goods Customers
distribution network facilities

Solid waste Sources of solid


Processing facilities Landfill locations
management waste

Operation of a Intermediate
Vendors Processing facilities
supply network warehouses

Coordinating product Production of a Market for a specific


Plants
mixes at plants specific product product

Cash flow Sources of cash at a Short-term Needs for cash at a


management specific time investment options specific time
6.13

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
The BMZ Maximum Flow
Problem
• The BMZ Company is a European manufacturer of luxury
automobiles. Its exports to the United States are particularly
important.
• BMZ cars are becoming especially popular in California, so it is
particularly important to keep the Los Angeles center well
supplied with replacement parts for repairing these cars.
• BMZ needs to execute a plan quickly for shipping as much as
possible from the main factory in Stuttgart, Germany to the
distribution center in Los Angeles over the next month.
• The limiting factor on how much can be shipped is the limited
capacity of the company’s distribution network.
Question: How many units should be sent through each
shipping lane to maximize the total units flowing from
Stuttgart to Los Angeles?
6.14

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
6.15
The BMZ Distribution Network

6.17
A Network Model for BMZ
RO

[60]

NY [50]

[80]
[40]

LA BO ST
[70]

[50]
[70]

NO
[40]

[30]

LI 6.18

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Spreadsheet Model for BMZ

BMZ Co. Maximum Flow Problem


From To Ship Capacity Nodes Net FlowSupply/Deman
Stuttgart Rotterdam 50 <= 50 Stuttgart 150
Stuttgart Bordeaux 70 <= 70 Rotterdam 0 = 0
Stuttgart Lisbon 30 <= 40 Bordeaux 0 = 0
Rotterdam New York 50 <= 60 Lisbon 0 = 0
Bordeaux New York 30 <= 40 New York 0 = 0
Bordeaux New Orleans 40 <= 50 New Orleans 0 = 0
Lisbon New Orleans 30 <= 30 Los Angeles -150
New York Los Angeles 80 <= 80
New OrleanLos Angeles 70 <= 70

6.19

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Assumptions of Maximum
Flow Problems
1.All flow through the network originates at one node, called
the source, and terminates at one other node, called the sink.
(The source and sink in the BMZ problem are the factory and
the distribution center, respectively.)
2.All the remaining nodes are transshipment nodes.
3.Flow through an arc is only allowed in the direction indicated
by the arrowhead, where the maximum amount of flow is
given by the capacity of that arc. At the source, all arcs point
away from the node. At the sink, all arcs point into the node.
4.The objective is to maximize the total amount of flow from the
source to the sink. This amount is measured in either of two
equivalent ways, namely, either the amount leaving the source 6.20
or the amount entering the sink.
Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
BMZ with Multiple Supply and Demand Points

• BMZ has a second, smaller factory in Berlin.


• The distribution center in Seattle has the capability of supplying
parts to the customers of the distribution center in Los Angeles
when shortages occur at the latter center.
Question: How many units should be sent through each shipping
lane to maximize the total units flowing from Stuttgart and
Berlin to Los Angeles and Seattle?

6.21

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Network Model for The Expanded
BMZ Problem HA

[40]
BN [60]
[30]
[20]

SE RO BE
[20]
[40]
[60]
NY [50]
[10]

[40]
[80]
LA BO ST
[70]

[50]
[70]
NO
[40]
[30]

LI 6.22

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Spreadsheet Model
From To Ship Capacity Nodes Net Flow Supply/Demand
Stuttgart Rotterdam 40 <= 50 Stuttgart 140
Stuttgart Bordeaux 70 <= 70 Berlin 80
Stuttgart Lisbon 30 <= 40 Hamburg 0 = 0
Berlin Rotterdam 20 <= 20 Rotterdam 0 = 0
Berlin Hamburg 60 <= 60 Bordeaux 0 = 0
Rotterdam New York 60 <= 60 Lisbon 0 = 0
Bordeaux New York 30 <= 40 Boston 0 = 0
Bordeaux New Orleans 40 <= 50 New York 0 = 0
Lisbon New Orleans 30 <= 30 New Orleans 0 = 0
Hamburg New York 30 <= 30 Los Angeles -160
Hamburg Boston 30 <= 40 Seattle -60
New Orleans Los Angeles 70 <= 70
New York Los Angeles 80 <= 80
New York Seattle 40 <= 40
Boston Los Angeles 10 <= 10
Boston Seattle 20 <= 20

Maximum Flow 220

6.23

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Let’s try

6.24

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of
McGraw-Hill Education.
Some Applications of Maximum
Flow Problems
1.Maximize the flow through a distribution network, as for BMZ.
2.Maximize the flow through a company’s supply network from
its vendors to its processing facilities.
3.Maximize the flow of oil through a system of pipelines.
4.Maximize the flow of water through a system of aqueducts.
5.Maximize the flow of vehicles through a transportation
network.

6.26

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Littletown Fire Department
• Littletown is a small town in a rural area.
• Its fire department serves a relatively large geographical area
that includes many farming communities.
• Since there are numerous roads throughout the area, many
possible routes may be available for traveling to any given
farming community.

Question: Which route from the fire station to a certain


farming community minimizes the total number of miles?

6.27

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
The Littletown Road System
8

A F 4

1 D 3 6
3 4 6
Fire 6 Farming
Station B 3 G Community
5 5
E 2
2
4
4 C 7 H 7

6.28

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
The Network Representation
A 6 F
8
3 4
1 D 3
4 6
(Origin) O 6 B G 6
3 T (Destination)
5 5
4 2 E 2 7
4
7
C H

6.29

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Spreadsheet Model
From To On Route Distance Nodes Net Flow Supply/Demand
Fire St. A 1 3 Fire St. 1 = 1
Fire St. B 0 6 A 0 = 0
Fire St. C 0 4 B 0 = 0
A B 1 1 C 0 = 0
A D 0 6 D 0 = 0
B A 0 1 E 0 = 0
B C 0 2 F 0 = 0
B D 0 4 G 0 = 0
B E 1 5 H 0 = 0
C B 0 2 Farm Com. -1 = -1
C E 0 7
D E 0 3
D F 0 8
E D 0 3
E F 1 6
E G 0 5
E H 0 4
F G 0 3
F Farm Com. 1 4
G F 0 3
G H 0 2
G Farm Com. 0 6
H G 0 2
H Farm Com. 0 7
6.30
Total Distance 19

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Assumptions of a Shortest Path
Problem
1.You need to choose a path through the network that starts at
a certain node, called the origin, and ends at another certain
node, called the destination.
2.The lines connecting certain pairs of nodes commonly are links
(which allow travel in either direction), although arcs (which
only permit travel in one direction) also are allowed.
3.Associated with each link (or arc) is a nonnegative number
called its length. (Be aware that the drawing of each link in the
network typically makes no effort to show its true length
other than giving the correct number next to the link.)
4.The objective is to find the shortest path (the path with the
minimum total length) from the origin to the destination. 6.33

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.
Applications of Shortest Path
Problems
1.Minimize the total distance traveled.
2.Minimize the total cost of a sequence of activities.
3.Minimize the total time of a sequence of activities.

6.34

Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written
consent of McGraw-Hill Education.

You might also like