Вы находитесь на странице: 1из 48

Table of Contents Chapter 7 (Network Optimization Problems)

Minimum-Cost Flow Problems (Section 7.1) A Case Study: The BMZ Maximum Flow Problem (Section 7.2) Maximum Flow Problems (Section 7.3) Shortest Path Problems: Littletown Fire Department (Section 7.4) Shortest Path Problems: General Characteristics (Section 7.4) Shortest Path Problems: Minimizing Sarahs Total Cost (Section 7.4) Shortest Path Problems: Minimizing Quicks Total Time (Section 7.4) Minimum Spanning Trees: The Modern Corp. Problem (Section 7.5) 7.27.12 7.137.16 7.177.21 7.227.25 7.267.27 7.287.31 7.327.36 7.377.48

Network Optimization (UW Lecture)

7.497.63

These slides are based upon a lecture to second-year MBA students at the University of Washington that discusses network optimization (as taught by one of the authors).

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 along each shipping lane?

The Distribution Network

80 units produced

F1

W1 60 units needed

DC

70 units F2 produced

W2 90 units needed

Data for Distribution Network

80 units produced

F1

$700/unit $300/unit [50 units max.] DC $400/unit [50 units max.] $200/unit [50 units max.]

60 units W1 needed

$400/unit [50 units max.] $900/unit 90 units W2 needed

70 units produced

F2

A Network Model
[80] F1 $300 [50] $700 [0] DC $400 [50] F2 [70] $400 [50] $900 W2 [- 90] $200 [50] [- 60] W1

The Optimal Solution

[80] F1 (50) [0] DC (30) F2 [70] (40) (50) (30) (30)

[- 60] W1

W2 [- 90]

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.

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.)

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.

Spreadsheet Model

B 3 4 5 6 7 8 9 10 11

From F1 F1 DC DC F2 F2

To W1 DC W1 W2 DC W2 Total Cost

Ship 30 50 30 50 30 40 $110,000

Capacity <= <= <= <= 50 50 50 50

Unit Cost $700 $300 $200 $400 $400 $900

Nodes F1 F2 DC W1 W2

Net Flow 80 70 0 -60 -90

= = = = =

Supply/Demand 80 70 0 -60 -90

J 3 4 5 6 7 8

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)

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)

Typical Applications of Minimum-Cost Flow Problems


Kind of Application Supply Nodes Sources of goods Sources of solid waste Vendors Transshipment Nodes Demand Nodes Customers

Operation of a distribution network


Solid waste management

Intermediate storage facilities


Processing facilities

Landfill locations

Operation of a supply network

Intermediate warehouses
Production of a specific product Short-term investment options

Processing facilities Market for a specific product Needs for cash at a specific time

Coordinating product Plants mixes at plants Cash flow management Sources of cash at a specific time

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 companys distribution network.

Question: How many units should be sent through each shipping lane to maximize the total units flowing from Stuttgart to Los Angeles?

The BMZ Distribution Network

[60 units max.]

RO Rotterdam

[50 units max.] New York NY {40 units max.] BO ST Stuttgart [70 units max.] Bordeaux [40 units max.]

[80 units max.] New Orle ans LA Los Angeles [70 units max] NO

[50 units max.] LI [30 units max.] Lisbon

A Network Model for BMZ


RO

[60] NY [80] [50]

[40] BO [70] ST

LA

[70] NO

[50]

[40] [30] LI

Spreadsheet Model for BMZ

B 3 4 5 6 7 8 9 10 11 12 13 14

From Stuttgart Stuttgart Stuttgart Rotterdam Bordeaux Bordeaux Lisbon New York New Orleans

To Rotterdam Bordeaux Lisbon New York New York New Orleans New Orleans Los Angeles Los Angeles Maximum Flow

Ship 50 70 30 50 30 40 30 80 70 150

<= <= <= <= <= <= <= <= <=

Capacity 50 70 40 60 40 50 30 80 70

Nodes Stuttgart Rotterdam Bordeaux Lisbon New York New Orleans Los Angeles

Net Flow 150 0 0 0 0 0 -150

Supply/Demand = = = = = 0 0 0 0 0

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 or the amount entering the sink.

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?

Network Model for The Expanded BMZ Problem


HA [40] BN [20] SE [40] [10] [80] NY [40] BO [50] NO [40] [30] LI [70] ST [60] [50] [30] RO [20] BE [60]

LA

[70]

Spreadsheet Model

B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

From Stuttgart Stuttgart Stuttgart Berlin Berlin Rotterdam Bordeaux Bordeaux Lisbon Hamburg Hamburg New Orleans New York New York Boston Boston

To Rotterdam Bordeaux Lisbon Rotterdam Hamburg New York New York New Orleans New Orleans New York Boston Los Angeles Los Angeles Seattle Los Angeles Seattle Maximum Flow

Ship 40 70 30 20 60 60 30 40 30 30 30 70 80 40 10 20 220

<= <= <= <= <= <= <= <= <= <= <= <= <= <= <= <=

Capacity 50 70 40 20 60 60 40 50 30 30 40 70 80 40 10 20

Nodes Stuttgart Berlin Hamburg Rotterdam Bordeaux Lisbon Boston New York New Orleans Los Angeles Seattle

Net Flow 140 80 0 0 0 0 0 0 0 -160 -60

Supply/Demand

= = = = = = =

0 0 0 0 0 0 0

Some Applications of Maximum Flow Problems


1. Maximize the flow through a distribution network, as for BMZ. 2. Maximize the flow through a companys 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.

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?

The Littletown Road System


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

The Network Representation

A 3 (Origin) O 6 4 1 B 2 7 C 4

6 D 3 E

8 6 5 4

F 3 G 2 H 4 6 7 T (Destination)

Spreadsheet Model
B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 C D E F G H I J K

From Fire St. Fire St. Fire St. A A B B B B C C D D E E E E F F G G G H H

To A B C B D A C D E B E E F D F G H G Farm Com. F H Farm Com. G Farm Com. Total Distance

On Route 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 19

Distance 3 6 4 1 6 1 2 4 5 2 7 3 8 3 6 5 4 3 4 3 2 6 2 7

Nodes Fire St. A B C D E F G H Farm Com.

Net Flow 1 0 0 0 0 0 0 0 0 -1

= = = = = = = = = =

Supply/Demand 1 0 0 0 0 0 0 0 0 -1

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.

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.

Minimizing Total Cost: Sarahs Car Fund


Sarah has just graduated from high school. As a graduation present, her parents have given her a car fund of $21,000 to help purchase and maintain a three-year-old used car for college. Since operating and maintenance costs go up rapidly as the car ages, Sarah may trade in her car on another three-year-old car one or more times during the next three summers if it will minimize her total net cost. (At the end of the four years of college, her parents will trade in the current used car on a new car for Sarah.)

Question: When should Sarah trade in her car (if at all) during the next three summers?

Sarahs Cost Data

Operating and Maintenance Costs for Ownership Year Purchase Price $12,000 1 $2,000 2 $3,000 3 $4,500 4 $6,500 1 $8,500

Trade-in Value at End of Ownership Year 2 $6,500 3 $4,500 4 $3,000

Shortest Path Formulation


25,000

17,000 10,500 (Origin) 0 5,500 1 5,500 2 10,500 5,500 3 10,500 (Destination)

5,500

17,000

Spreadsheet Model
B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 C D E F G H I J

Year 1 Year 2 Year 3 Year 4

Operating & Maint. Cost $2,000 $3,000 $4,500 $6,500

Trade-in Value at End of Year $8,500 $6,500 $4,500 $3,000

Purchase Price $12,000

From Year 0 Year 0 Year 0 Year 0 Year 1 Year 1 Year 1 Year 2 Year 2 Year 3

To Year 1 Year 2 Year 3 Year 4 Year 2 Year 3 Year 4 Year 3 Year 4 Year 4 Total Cost

On Route 0 1 0 0 0 0 0 0 1 0 $21,000

Cost $5,500 $10,500 $17,000 $25,000 $5,500 $10,500 $17,000 $5,500 $10,500 $5,500

Nodes Year 0 Year 1 Year 2 Year 3 Year 4

Net Flow 1 0 0 0 -1

= = = = =

Supply/Demand 1 0 0 0 -1

Minimizing Total Time: Quick Company


The Quick Company has learned that a competitor is planning to come out with a new kind of product with great sales potential. Quick has been working on a similar product that had been scheduled to come to market in 20 months. Quicks management wishes to rush the product out to meet the competition. Each of four remaining phases can be conducted at a normal pace, at a priority pace, or at crash level to expedite completion. However, the normal pace has been ruled out as too slow for the last three phases. $30 million is available for all four phases.

Question: At what pace should each of the four phases be conducted?

Time and Cost of the Four Phases


Level Normal Priority Crash Remaining Research 5 months 4 months 2 months Development 3 months 2 months Design of Mfg. System 5 months 3 months Initiate Production and Distribution 2 months 1 month

Level Normal Priority Crash

Remaining Research $3 million 6 million 9 million

Development $6 million 9 million

Design of Mfg. System $9 million 12 million

Initiate Production and Distribution $3 million 6 million

Shortest Path Formulation


,

2 5 3 ty) 2, 21(P riority) 3, 12(P riority) 4, 9 o ri i (C 3 r P ( ras 1, 27 2 h) ( Cr a sh) 2 5 5 al) 4, 6 2, 18 3, 9 m ) (P riority) r (P riority) y t 3 ri No (C 3 ( 4 io r as (Origin) 0, 30 1, 24 (Pr (P riority) ( h) 2 Cr (C 2 as 2 ra s h) 2, 15 5 4, 3 3, 6 h) (P riority) ((Priority) 3 ri ty ) (C 3 ras 1, 21 ri o h) (Cr (P2 ash 2 5 3, 3 4, 0 ) 2, 12(P riority) (P riority)

0 0 0 0 T (Destination)

r (C (C (C

1 h) as 1 h) s

ra

1 s h) ra

Spreadsheet Model
B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 C D E F G H I J K

From (0, 30) (0, 30) (0, 30) (1, 27) (1, 27) (1, 24) (1, 24) (1, 21) (1, 21) (2, 21) (2, 21) (2, 18) (2, 18) (2, 15) (2, 15) (2, 12) (3, 12) (3, 12) (3, 9) (3, 9) (3, 6) (3, 6) (3, 3) (4, 9) (4, 6) (4, 3) (4, 0)

To (1, 27) (1, 24) (1, 21) (2, 21) (2, 18) (2, 18) (2, 15) (2, 15) (2, 12) (3, 12) (3, 9) (3, 9) (3, 6) (3, 6) (3, 3) (3, 3) (4, 9) (4, 6) (4, 6) (4, 3) (4, 3) (4, 0) (4, 0) (T) (T) (T) (T) Total Time

On Route 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 10

Time 5 4 2 3 2 3 2 3 2 5 3 5 3 5 3 5 2 1 2 1 2 1 2 0 0 0 0

Nodes (0, 30) (1, 27) (1, 24) (1, 21) (2, 21) (2, 18) (2, 15) (2, 12) (3, 12) (3, 9) (3, 6) (3, 3) (4, 9) (4, 6) (4, 3) (4, 0) (T)

Net Flow 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1

= = = = = = = = = = = = = = = = =

Supply/Demand 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1

The Optimal Solution

Phase Remaining research Development Design of manufacturing system Initiate production and distribution Total

Level Crash Priority Crash Priority

Time 2 months 3 months 3 months 2 months 10 months

Cost $9 million 6 million 12 million 3 million $30 million

Minimum Spanning Trees: The Modern Corp. Problem


Modern Corporation has decided to have a state-of-the-art fiber-optic network installed to provide high-speed communication (data, voice, and video) between its major centers. Any pair of centers do not need to have a cable directly connecting them in order to take advantage of the technology. All that is necessary is to have a series of cables that connect the centers.

Question: Which cables should be installed to provide high-speed communications between every pair of centers.

Modern Corporations Major Centers

B 2 5 2 7 5 A C 4 E G

4 1 3 1

The Optimal Solution

B 2 2 5 A C E G

Assumptions of a Minimum-Spanning Tree Problem

1. You are given the nodes of a network but not the links. Instead, you are given the potential links and the positive cost (or a similar measure) for each if it is inserted into the network. 2. You wish to design the network by inserting enough links to satisfy the requirement that there be a path between every pair of nodes. 3. The objective is to satisfy this requirement in a way that minimizes the total cost of doing so.

Algorithm for a Minimum-Spanning-Tree Problem


1. Choice of the first link: Select the cheapest potential link. 2. Choice of the next link: Select the cheapest potential link between a node that already is touched by a link and a node that does not yet have such a link. 3. Repeat step 2 over and over until every node is touched by a link (perhaps more than one). At that point, an optimal solution (a minimum spanning tree) has been obtained. (Ties for the cheapest potential link at each step may be broken arbitrarily.)

Application of Algorithm to Modern Corp.: First Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Application of Algorithm to Modern Corp.: Second Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Application of Algorithm to Modern Corp.: Third Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Application of Algorithm to Modern Corp.: Fourth Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Application of Algorithm to Modern Corp.: Fifth Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Application of Algorithm to Modern Corp.: Final Link

B 2 5 2 7 5 A C 4 E 7 4 1 3 1 G

Applications of Minimum-Spanning-Tree Problems


1. Design of telecommunication networks (computer networks, lease-line telephone networks, cable television networks, etc.)

2. Design of a lightly-used transportation network to minimize the total cost of providing the links (rail lines, roads, etc.)
3. Design of a network of high-voltage electrical power transmission lines.

4. Design of a network of wiring on electrical equipment (e.g., a digital computer system) to minimize the total length of the wire.
5. Design of a network of pipelines to connect a number of locations.

Вам также может понравиться