Spreadsheet Modeling

& Decision Analysis

A Practical Introduction to

Business Analytics

7 th edition

Cliff T. Ragsdale

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Chapter 5

Network Modeling

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Introduction

 A number of business problems can be represented graphically as networks.

 This chapter focuses on several such problems:

– Transshipment Problems

– Shortest Path Problems

– Maximal Flow Problems

– Transportation/Assignment Problems

– Generalized Network Flow Problems

– The Minimum Spanning Tree Problem

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Network Flow Problem

Characteristics

 Network flow problems can be represented as a collection of nodes connected by arcs.

 There are three types of nodes:

– Supply

– Demand

– Transshipment

 We’ll use negative numbers to represent supplies and positive numbers to represent demand.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

A Transshipment Problem:

The Bavarian Motor Company

+100

$30 Boston

2 $50

Newark

1

-200

+60

Columbus

3

$40

$35

$25

+170

$35

Atlanta

5

$30 Richmond

4

+80

$45

$40

$50

+70

Mobile

6

$50

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

J'ville

7

-300

Defining the Decision Variables

For each arc in a network flow model we define a decision variable as:

X ij

= the amount being shipped (or flowing) from node i to node j

For example…

X

12

= the # of cars shipped from node 1 (Newark) to node 2 (Boston)

X

56

= the # of cars shipped from node 5 (Atlanta) to node 6 (Mobile)

Note: The number of arcs determines the number of variables!

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Objective Function

Minimize total shipping costs.

MIN : 30X

12

+ 40X

14

+ 50X

23

+ 35X

35

+40X

53

+ 30X

54

+ 35X

56

+ 25X

65

+ 50X

74

+ 45X

75

+ 50X

76

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Constraints for Network Flow Problems:

The Balance-of-Flow Rules

For Minimum Cost Network

Flow Problems Where:

Total Supply > Total Demand

Total Supply < Total Demand

Total Supply = Total Demand

Apply This Balance-of-Flow

Rule At Each Node:

Inflow-Outflow >= Supply or Demand

Inflow-Outflow <=Supply or Demand

Inflow-Outflow = Supply or Demand

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Constraints

 In the BMC problem:

Total Supply = 500 cars

(Supply >= Demand)

Total Demand = 480 cars

 For each node we need a constraint like this:

Inflow - Outflow >= Supply or Demand

 Constraint for node 1:

–X

12

– X

14

>= – 200

(Note: there is no inflow for node 1!)

 This is equivalent to:

+X

12

+ X

14

<= 200

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Constraints

 Flow constraints

–X

12

+X

12

– X

14

– X

23

>= –200

>= +100

+X

23

+ X

53

– X

35

>= +60

} node 1

} node 2

} node 3

+ X

14

+ X

54

+ X

74

>= +80

+ X

35

+ X

65

+ X

75

– X

53

– X

54

+ X

56

–X

74

+ X

76

– X

– X

75

– X

76

65

>= +70

>= –300

 Nonnegativity conditions

} node 4

– X

56

>= +170 } node 5

} node 6

} node 7

X ij

>= 0 for all ij

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Implementing the Model

See file Fig5-2.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Optimal Solution to the BMC Problem

+100

$50

20

+60

Columbus

3

40

+170

$40

Atlanta

5

Boston

2

$30

120

Newark

1

-200

80

$40

Richmond

4

+80

+70

Mobile

6

$45

210

70

$50

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

J'ville

7

-300

The Shortest Path Problem

 Many decision problems boil down to determining the shortest (or least costly) route or path through a network.

– Ex. Emergency Vehicle Routing

 This is a special case of a transshipment problem where:

– There is one supply node with a supply of -1

– There is one demand node with a demand of +1

– All other nodes have supply/demand of +0

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

-1

3.0 hrs

4 pts

B'ham

1

The American Car Association

+0

L'burg

9

3.3 hrs

5 pts

Va Bch

11

5.0 hrs

9 pts 2.0 hrs

4 pts

+1

+0

4.7 hrs

9 pts

+0

1.1 hrs

3 pts

2.7 hrs

4 pts

K'ville

5

2.0 hrs

9 pts

G'boro

8

Raliegh

10

+0

1.7 hrs

5 pts

3.0 hrs

4 pts

A'ville

6 +0

1.5 hrs

3 pts 2.3 hrs

3 pts +0

Chatt.

3

2.8 hrs

7 pts

2.0 hrs

8 pts

Charl.

7

+0

2.5 hrs

3 pts

1.7 hrs

4 pts

G'ville

4

1.5 hrs

2 pts

Atlanta

2

2.5 hrs

3 pts

+0

+0

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Problem

 There are two possible objectives for this problem

– Finding the quickest route (minimizing travel time)

– Finding the most scenic route (maximizing the scenic rating points)

See file Fig5-7.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Equipment

Replacement Problem

 The problem of determining when to replace equipment is another common business problem.

 It can also be modeled as a shortest path problem…

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Compu-Train Company

 Compu-Train provides hands-on software training.

 Computers must be replaced at least every two years.

 Two lease contracts are being considered:

– Each requires $62,000 initially

– Contract 1:

 Prices increase 6% per year

 60% trade-in for 1 year old equipment

 15% trade-in for 2 year old equipment

– Contract 2:

 Prices increase 2% per year

 30% trade-in for 1 year old equipment

 10% trade-in for 2 year old equipment

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Network for Contract 1

+0

2

$63,985

$30,231

+0

4

$28,520

$33,968

$32,045

-1 1

$60,363

3

+0

$67,824

5 +1

Cost of trading after 1 year: 1.06*$62,000 - 0.6*$62,000 = $28,520

Cost of trading after 2 years: 1.06

2

*$62,000 - 0.15*$62,000 = $60,363 etc, etc….

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Problem

See file Fig5-12.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Transportation

& Assignment Problems

 Some network flow problems don’t have transshipment nodes; only supply and demand nodes.

Supply

275,000

Groves

Mt. Dora

1

Distances (in miles)

21

50

Processing

Plants

Capacity

Ocala

4

200,000

400,000

Eustis

2

22

Orlando

5

600,000

300,000

55

Clermont

3

25

20

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Leesburg

6

225,000

Generalized

Network Flow Problems

 In some problems, a gain or loss occurs in flows over arcs.

– Examples

 Oil or gas shipped through a leaky pipeline

 Imperfections in raw materials entering a production process

 Spoilage of food items during transit

 Theft during transit

 Interest or dividends on investments

 These problems require some modeling changes.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Coal Bank Hollow Recycling

Process 1

Material

Newspaper

Cost Yield

$13 90%

Mixed Paper $11 80%

White Office Paper $9 95%

Cardboard $13 75%

Process 2

Cost Yield

$12 85%

$13 85%

$10 90%

$14 85%

Supply

70 tons

50 tons

30 tons

40 tons

Newsprint Packaging Paper Print Stock

Pulp Source Cost Yield

Recycling Process 1 $5 95%

Recycling Process 2 $6 90%

Contracted demand 60 tons

Cost Yield

$6 90%

$8 95%

40 tons

Cost Yield

$8 90%

$7 95%

50 tons

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Network for Recycling Problem

-70 Newspaper

1

$12

$13

-50

Mixed paper

2

$11

$13

-30

White office paper

3

$9

$10

$13

-40 Cardboard

4

$14

90% +0

80%

95%

75%

Recycling

Process 1

5

$8

$5

$6

85%

85%

90%

85%

Recycling

Process 2

6

+0

$6

$7

$8

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

95%

90%

Newsprint pulp

7

+60

90%

95%

Packing paper pulp

8

+40

90%

95%

Print stock pulp

9

+50

Defining the Objective Function

Minimize total cost.

MIN : 13X

15

+ 12X

16

+ 11X

25

+ 13X

26

+ 9X

35

+ 10X

36

+ 6X

58

+ 8X

59

+ 13X

45

+ 6X

67

+ 14X

+ 8X

68

46

+ 5X

+ 7X

69

57

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Constraints-I

 Raw Materials

-X

15

-X

16

>= -70 } node 1

-X

25

-X

26

>= -50 } node 2

-X

35

-X

36

>= -30 } node 3

-X

45

-X

46

>= -40 } node 4

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Constraints-II

 Recycling Processes

+0.9X

15

+0.8X

25

+0.95X

35

+0.75X

45

- X

57

- X

58

-X

59

>= 0 } node 5

+0.85X

16

+0.85X

26

+0.9X

36

+0.85X

46

-X

67

-X

68

-X

69

>= 0 } node 6

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Defining the Constraints-III

Paper Pulp

+0.95X

57

+ 0.90X

67

>= 60 } node 7

+0.90X

57

+ 0.95X

67

>= 40 } node 8

+0.90X

57

+ 0.95X

67

>= 50 } node 9

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Implementing the Model

See file Fig5-17.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Important Modeling Point - I

 In generalized network flow problems, gains and/or losses associated with flows across each arc effectively increase and/or decrease the available supply.

 This can make it difficult to tell if the total supply is adequate to meet the total demand.

 When in doubt, it is best to assume the total supply is capable of satisfying the total demand and use Solver to prove (or refute) this assumption.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Important Modeling Point - II

 If all the demand can’t be met, another objective might be to meet as much of the demand as possible at minimum cost.

 To do this, modify the network as follows:

– Add an artificial supply node with an arbitrarily large amount of supply.

– Connect the artificial supply node to each demand node with arbitrarily large costs on each artificial arc.

– This causes as much demand as possible to be met using real supply to minimize use of the expensive artificial supply.

See file Fig5-23.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Maximal Flow Problem

 In some network problems, the objective is to determine the maximum amount of flow that can occur through a network.

 The arcs in these problems have upper and lower flow limits.

 Examples

– How much water can flow through a network of pipes?

– How many cars can travel through a network of streets?

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Northwest Petroleum Company

Pumping

Station 1

3

Pumping

Station 3

4

2

6

6

2

1

Oil Field

Refinery

4

2

3

5

5

Pumping

Station 2

Pumping

Station 4

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

4

6

The Northwest Petroleum Company

Pumping

Station 1

Pumping

Station 3

3

2

4

6

6

2

1

Oil Field

Refinery 6

4

2

3

Pumping

Station 2

5

5

Pumping

Station 4

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

4

Formulation of the Max Flow Problem

MAX: X

61

Subject to: +X

61

- X

12

- X

13

= 0

+X

12

- X

24

- X

25

= 0

+X

13

- X

34

- X

35

= 0

+X

24

+ X

34

- X

46

= 0

+X

25

+ X

35

- X

56

= 0

+X

46

+ X

56

- X

61

= 0 with the following bounds on the decision variables:

0 <= X

12

<= 6

0 <= X

13

<= 4

0 <= X

24

<= 3

0 <= X

25

0 <= X

34

0 <= X

35

<= 2 0 <= X

46

<= 2 0 <= X

56

<= 5 0 <= X

61

<= 6

<= 4

<= inf

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Implementing the Model

See file Fig5-26.xlsm

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

5

6

Optimal Solution

Pumping

Station 1

Pumping

Station 3

3

3

2

4

2 2

6

5

1

Oil Field

Refinery

4

4

2

2

3 5

5

2

Pumping

Station 2

Pumping

Station 4

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

4

4

6

Special Modeling Considerations:

Flow Aggregation

-100 1

$3

$4

+0

3

$5

$3

5 +75

-100

2

$4

$5

4

$5

$6

+0

6 +50

Suppose the total flow into nodes 3 & 4 must be at least 50 and 60, respectively. How would you model this?

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Special Modeling Considerations:

Flow Aggregation

-100

-100

1

$3

$4

$4

2

$5

+0

30

40

+0

L.B.=50

L.B.=60

+0

3

$5

$3

$5

4

$6

+0

5 +75

6 +50

Nodes 30 & 40 aggregate the total flow into nodes

3 & 4, respectively.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Special Modeling Considerations:

Multiple Arcs Between Nodes

$8

-75 1

$6

U.B. = 35

2

+50

Two two (or more) arcs cannot share the same beginning and ending nodes. Instead, try...

+0

10

$0 $8

-75

1

$6

U.B. = 35

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

2 +50

Special Modeling Considerations:

Capacity Restrictions on Total Supply

-100

$5, UB=40

+75

1 3

$4, UB=30

-100

2

$6, UB=35

$3, UB=35

4

+80

Supply exceeds demand, but the upper bounds prevent the demand from being met.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Special Modeling Considerations:

Capacity Restrictions on Total Supply

-100

$5, UB=40

+75

1 3

+200

$999, UB=100

0

$4, UB=30

$6, UB=35

$999, UB=100 2 4

-100

$3, UB=35

+80

Now demand exceeds supply. As much “real” demand as possible will be met in the least costly way.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Minimal

Spanning Tree Problem

 For a network with n nodes, a spanning tree is a set of n-1 arcs that connects all the nodes and contains no loops.

 The minimal spanning tree problem involves determining the set of arcs that connects all the nodes at minimum cost.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Minimal Spanning Tree Example:

Windstar Aerospace Company

$150

2 4

$100 $85

$75

$40

1 $80

5

$85

$90

3 $50

$65

6

Nodes represent computers in a local area network.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Minimal Spanning Tree Algorithm

1.

Select any node. Call this the current subnetwork.

2.

Add to the current subnetwork the cheapest arc that connects any node within the current subnetwork to any node not in the current subnetwork. (Ties for the cheapest arc can be broken arbitrarily.) Call this the current subnetwork.

3.

If all the nodes are in the subnetwork, stop; this is the optimal solution. Otherwise, return to step 2.

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 1

2 4

$100 $85

3

$85

1

$90

$80

6

5

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 2

2 4

$100 $85

$75

$80 1

5

$85

$90

3 $50

6

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 3

2 4

$100 $85

$75

$80 1

5

$85

3 $50

6

$65

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 4

2 4

$100 $85

$75

$40

$80 1

5

3 $50

$65

6

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 5

$150

2 4

$85

$75

$40

$80 1

5

3 $50

$65

6

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Solving the Example Problem - 6

2 4

$75

$40

$80 1

5

3 $50

$65

6

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

End of Chapter 5

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The Analytic Solver Platform software featured in this book is provided by Frontline Systems.

http://www.solver.com

© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.