10
1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2 S2 S1 T {600} {800}

1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

Embed Size (px)

Citation preview

Page 1: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

1

Lecture 24 – HW #10

Discrete Optimization ModelsProblem 11-27 on page 619We need to move our natural gas from two fields to

our main terminal.

F1

F2 S2

S1

T

{600}

{800}

Page 2: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

2

Jeff – when I did this before I had the wrong model – resolve with correct model and update slides

Page 3: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

3

The Requirement Data

Node Requirement(> 0 => supply, < 0 =>

demand)

F1 (Field #1) 800,000,000 cubic feet

F2 (Field #2) 600,000,000 cubic feet

S1 (Storage Area #1) 0

S2 (Storage Area #2) 0

T (Main Terminal) -1,400,000,000 cubic feet

Page 4: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

4

The Cost Data

Pipe Length (miles)

Fixed Cost($)

Variable Cost($/cubic foot)

Capacity(cubic feet)

F1S1 80 8,000,000 .002 1,000,000,000

F2F1 60 6,000,000 .002 1,000,000,000

F2S1 100 10,000,000

.002 1,000,000,000

F2S2 140 14,000,000

.002 1,000,000,000

S1S2 20 2,000,000 .002 1,000,000,000

S1T - 0 .002 1,000,000,000

S2T - 0 .002 1,000,000,000

Page 5: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

5

Objective

Determine the pipes to be constructed and the flow of gas to the terminal that minimizes total cost.

How much does it cost to build F1S1 and send 1 cubic foot of gas through this pipe?

Answer: 8,000,000 + (.002)(1) = 8,000,000.002

Cost is composed of a fixed cost plus a variable cost.

Page 6: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

6

AMPL Model

var F1S1 >= 0, <= 1000; # units are 000,000svar F2F1 >= 0, <= 1000;var F2S1 >= 0, <= 1000;var F2S2 >= 0, <= 1000;var S1S2 >= 0, <= 1000;var S1T >= 0, <= 1000;var S2T >= 0, <= 1000;

var YF1S1 binary;var YF2F1 binary;var YF2S1 binary;var YF2S2 binary;var YS1S2 binary;

Page 7: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

7

AMPL Model Continued

minimize Cost: 8000000*YF1S1 + 6000000*YF2F1 + 10000000*YF2S1

+ 14000000*YF2S2 + 2000000*YS1S2 + 2000*(F1S1 + F2F1 + F2S1 + F2S2 + S1S2 + S1T +

S2T);

subject to Field1: F1S1 - F2F1 = 800;subject to Field2: F2F1 + F2S1 + F2S2 = 600;

subject to Storage1: S1S2 + S1T - F1S1 - F2S1 = 0;subject to Storage2: S2T - F2S2 - S1S2 = 0;

subject to Terminal: -S1T -S2T = -1400;

Page 8: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

8

AMPL Model Continued

subject to FixedF1S1: F1S1 <= 1000*YF1S1; #Why does this work?

subject to FixedF2F1: F2F1 <= 600*YF2F1;subject to FixedF2S1: F2S1 <= 600*YF2S1;subject to FixedF2S2: F2S2 <= 600*YF2S2;

subject to FixedS1S2: S1S2 <= 1000*YS1S2;

solve;

display F1S1, F2F1, F2S1, F2S2, S1S2, S1T, S2T;

display YF1S1, YF2F1, YF2S1, YF2S2, YS1S2;

Page 9: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

9

Output

AMPL Version 20020516 Win32CPLEX 8.0.0: optimal integer solution; objective 264000003 MIP simplex iterations 0 branch-and-bound nodesF1S1 = 800F2F1 = 0F2S1 = 600F2S2 = 0S1S2 = 400S1T = 1000S2T = 400YF1S1 = 1YF2F1 = 0YF2S1 = 1YF2S2 = 0YS1S2 = 1

Page 10: 1 Lecture 24 – HW #10 Discrete Optimization Models Problem 11-27 on page 619 We need to move our natural gas from two fields to our main terminal. F1 F2S2

10

Solution

F1

F2 S2

S1

T

800,000,000

600,000,000

-1,400,000,000800

600400

1000

400