Download presentation
Presentation is loading. Please wait.
Published byLeonard Norman Modified over 9 years ago
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 S1 T {600} {800}
2
2 Jeff – when I did this before I had the wrong model – resolve with correct model and update slides
3
3 The Requirement Data NodeRequirement (> 0 => supply, 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
4
4 The Cost Data PipeLength (miles) Fixed Cost ($) Variable Cost ($/cubic foot) Capacity (cubic feet) F1S1808,000,000.0021,000,000,000 F2F1606,000,000.0021,000,000,000 F2S110010,000,000.0021,000,000,000 F2S214014,000,000.0021,000,000,000 S1S2202,000,000.0021,000,000,000 S1T-0.0021,000,000,000 S2T-0.0021,000,000,000
5
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.
6
6 AMPL Model var F1S1 >= 0, <= 1000; # units are 000,000s var 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;
7
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;
8
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;
9
9 Output AMPL Version 20020516 Win32 CPLEX 8.0.0: optimal integer solution; objective 26400000 3 MIP simplex iterations 0 branch-and-bound nodes F1S1 = 800 F2F1 = 0 F2S1 = 600 F2S2 = 0 S1S2 = 400 S1T = 1000 S2T = 400 YF1S1 = 1 YF2F1 = 0 YF2S1 = 1 YF2S2 = 0 YS1S2 = 1
10
10 Solution F1 F2S2 S1 T 800,000,000 600,000,000 -1,400,000,000 800 600 400 1000 400
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.