Assignment 4 Data

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Muhammad Abdullah Aziz 阿布

120204200050

Homework 4

Question.1
Assessing the Capacity of a Pipeline Network Exxo 76 is an oil company that operates the
pipeline network shown below, where each pipeline is labeled with its maximum fow rate in
million cubic feet (MMcf) per day. A new oil well has been constructed near A. They would like
to transport oil from the well near A to their refinery at G. Formulate and solve a network
optimization model to determine the maximum flow rate from A to G.

Answer

Associated with each pipe in the network will be an arc (or, for pipes which might flow in either direction,
two arcs, one in each direction). To set up a spreadsheet model, first list all of the arcs as shown in B5:
C19, along with their capacity (F5:F19]. Then list all of the nodes as shown in H5: H11. All the
transshipment nodes (every node except the start node A and the end node G) will be constrained to
have net flow =0
From To Capacity Nodes Supply / Demand

1 A B 20 A

2 A C 20 B = 0

3 B C 2 C = 0

4 B D 15 D = 0

5 B F 12 E = 0

6 C B 2 F = 0

7 C E 23 G

8 C F 8

9 D F 6

10 D G 14

11 E F 15

12 E G 16

13 F D 6

14 F E 15

15 F G 4

We are changes the cells are the amount of flow to send through each pipe These are shown in Flow

(D5: D19) below, with an arbitrary value of 0 entered for each. The flow through each arc is

capacitated as indicated by the <=in E5: E19


A B C D E F

1 Thousands of gallons / hours


Flo
2 From To w Capacity

3 A B 0 <= 20

4 A C 0 <= 20

5 B C 0 <= 2

6 B D 0 <= 15

7 B F 0 <= 12

8 C B 0 <= 2

9 C E 0 <= 23

10 C F 0 <= 8

11 D F 0 <= 6

12 D G 0 <= 14

13 E F 0 <= 15

14 E G 0 <= 16

15 F D 0 <= 6

16 F E 0 <= 15

17 F G 0 <= 4

Each node, calculate the net flow as a function of the changing cells. This can be done using the

SUMIF function. In each case, the first SUMIF function calculates the flow leaving the node and

the second one calculates the flow entering the node. For example, consider the A node (H5].

SUMIFCFROM, Nodes, Flow) in I5 sums each individual entry in Flow (the changing cells
in D5: D19) if that entry is in a row where the entry in from (B5: B19) is the same as in the

entry in the Since the only rows that have A in from (B5: B19) are rows 5 and 6, the sum in

the ship column is only over these same rows, so this Sum is D5+D6

A B C D E F G H I J K
Thousands of gallon /
1 Hours Thousands of gallon/ Hours
T Flo Net
2 Fro o w Capacity Nodes flow Supply / Demand
m

3 A B 0 <= 20 A 0

4 A C 0 <= 20 B 0 = 0

5 B C 0 <= 2 C 0 = 0

6 B D 0 <= 15 D 0 = 0

7 B F 0 <= 12 E 0 = 0

8 C B 0 <= 2 F 0 = 0

9 C E 0 <= 23 G 0

10 C F 0 <= 8

11 D F 0 <= 6

12 D G 0 <= 14

13 E F 0 <= 15

14 E G 0 <= 16

15 F D 0 <= 6

16 F G 0 <= 15

17 F E 0 <= 4
1 I
Net
2 fow

3 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

4 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

5 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

6 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

7 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

8 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

9 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

The goal is to maximize the amount shipped from A to G . Since nodes B through

transshipment nodes (net fow=0), any amount that leaves A must enter G. Thu e The goal is to

maximize the amount shipped from A to G. Since nodes B through F maximizing the fow out of

A will achieve our goal. Thus, the formula entered into the objective cell Maximumfow (D21)

is=15
A B C D E F G H I J K

1 Thousands of gallon / Hours Thousands of gallon / Hours

2 From To Flow Capacity Nodes Net flow Supply / Demand

3 A B 0 <= 20 A 0

4 A C 0 <= 20 B 0 = 0

5 B C 0 <= 2 C 0 = 0

6 B D 0 <= 15 D 0 = 0

7 B F 0 <= 12 E 0 = 0

8 C B 0 <= 2 F 0 = 0

9 C E 0 <= 23 G 0

10 C F 0 <= 8

11 D F 0 <= 6

12 D G 0 <= 14

13 E F 0 <= 15

14 E G 0 <= 16

15 F D 0 <= 6

16 F E 0 <= 15

17 F G 0 <= 4

18 Maximum
Flow 0
19

C D

21 Maximum fow 0
The solver information and solved spreadsheet are shown below

A B C D E F G H I J K

1 Thousands of gallon / Hours Thousands of gallon / Hours

2 From To Flow Capacity Nodes Net fow Supply / Demand

3 A B 20 <= 20 A 34

4 A C 14 <= 20 B 0 = 0

5 B C 0 <= 2 C 0 = 0

6 B D 14 <= 15 D 0 = 0

7 B F 8 <= 12 E 0 = 0

8 C B 2 <= 2 F 0 = 0

9 C E 12 <= 23 G -35

10 C F 0 <= 8

11 D F 0 <= 6

12 D G 14 <= 14

13 E F 0 <= 15

14 E G 16 <= 16

15 F D 0 <= 6

16 F E 4 <= 15

17 F G 4 <= 4

18 Maximum 0
Flow
19
Solver perimeter

Set object cell: maximum fow


To: Max
By changing variable cell :
Flow
Subject to constraints:
Flow<= capacity
Net Flow = supply Demand
Solver opinions:
Make variables Non negative
Solving method: simplex LP

Range Name Cells

Capacity F5: F19


Flow D5: D19
From B5: B19
Maximum Flow D21
Net Flow 16: I10
Nodes H5: H11
Supply Demand K6: K10
To C5: C19

2 Net Flow

3 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

4 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

5 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

6 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

7 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

8 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)

9 =SUFIM(from,Nodes,fow)-SUFIM(To,Nodes,Flow)
Thus, Flow (D5:D19) indicates how to send oil through the network so as to achieve the Maximum
fow(D21) of 34 thousand gallon/hour

Question 6.3

Driving to the Mile-High City Sarah and Jennifer have just graduated from college at the University of
Washington in Seattle and want to go on a road trip. They have always wanted to see the mile-high city
of Denver. Their road atlas shows the driving time (in hours) between various city pairs, as shown below.
Formulate and solve a network optimization model to fnd the quickest route from Seattle to Denver.
Answer:

You might also like