1 / 38

Dave Powell, USDA Forest Service, forestryimages Image number 1210054

FORS 8450 • Advanced Forest Planning Lecture 3 Linear Programming - The Simplex Method (Appendix B of Bettinger, Boston, Siry, and Grebner). Dave Powell, USDA Forest Service, www.forestryimages.org Image number 1210054. Create DCM. Linear programming Simplex method. Calc. opportunity

dane-riddle
Download Presentation

Dave Powell, USDA Forest Service, forestryimages Image number 1210054

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FORS 8450 • Advanced Forest Planning Lecture 3 Linear Programming - The Simplex Method (Appendix B of Bettinger, Boston, Siry, and Grebner) Dave Powell, USDA Forest Service, www.forestryimages.org Image number 1210054

  2. Create DCM Linear programming Simplex method Calc. opportunity costs Optimal ? Yes Stop No ID Pivot Column Calc. maximum contributions ID Pivot Row ID Pivot Number Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  3. Linear programming Simplex method - Example Maximize 2.5 X + 8 Y Subject to: 15 X + 20 Y  60 X + 5 Y  10 Y X + 5 Y  10 X 15 X + 20 Y  60

  4. Linear programming Simplex method - Example X Y S1 S2 Q Objective function 2.5 8 2.5 X + 8 Y Constraint 1 15 20 1 60 15 X + 20 Y + S1 = 60 Constraint 2 1 5 1 10 X + 5 Y + S2 = 10 Initially, Q = RHS values

  5. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop No X Y S1 S2 Q ID Pivot Column 2.5 8 15 20 1 60 Calc. maximum contributions 1 5 1 10 ID Pivot Row ID Pivot Number Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  6. Linear programming Simplex method - Example Maximize 2.5 X + 8 Y Subject to: 15 X + 20 Y  60 X + 5 Y  10 Where are we? Y X + 5 Y  10 X 15 X + 20 Y  60

  7. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row Variables currently in the solution have an opportunity cost of 0 or less. "Their value" is their value in the objective function. ID Pivot Number Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  8. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row OCx = (Objective function value of variable X) - ((Columnx1 value) ("their value1")) - ((Columnx2 value) ("their value2")) ID Pivot Number Calc. "Ratio" OCx = (2.5) - ((15) (0)) - ((1) (0)) = 2.5 OCy = (8) - ((20) (0)) - ((5) (0)) = 8.0 Transform Pivot Row OCS1 = (0) - ((1) (0)) - ((0) (0)) = 0 Transform Non-Pivot Row(s) OCS2 = (0) - ((0) (0)) - ((1) (0)) = 0

  9. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row 2.5 8.0 0 0 Opportunity costs ID Pivot Number  Not the optimal solution, since some opportunity costs are > 0. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  10. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row 2.5 8.0 0 0 Opportunity costs ID Pivot Number  Pivot Column is the column with the highest opportunity cost  Whichever variable that column refers to is "coming into the solution." Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  11. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row ID Pivot Number  Maximum contributions are the most that the variable represented by the Pivot Column can bring into the solution. Max contribution = (Q row / Pivot Column value row ) Calc. "Ratio" Transform Pivot Row MC constraint #1 = (60 / 20) = 3 MC constraint #2 = (10 / 5) = 2 Transform Non-Pivot Row(s)

  12. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row ID Pivot Number  The most of Y that we can bring into the solution is 2 units (related to constraint row #2). Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  13. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row ID Pivot Number  The Pivot Row is the row related to the maximum contribution of variable Y Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  14. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row ID Pivot Number  The Pivot Number is the value of the cell at the intersection of the Pivot Row and the Pivot Column. Here, the Pivot Number = 5 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  15. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 1 5 1 10 S2 0 ID Pivot Row ID Pivot Number  The "Ratio" for this simple 2-constraint problem is the value in the cell of the non-Pivot Row / Pivot Column (20) divided by the Pivot Number. Here, the "ratio" = (20 / 5) = 4 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  16. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 0.2 1 0.2 2 S2 0 ID Pivot Row ID Pivot Number  Transform the Pivot Row by dividing all values in that row by the Pivot Number. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  17. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  This indicates that we are bringing the Y variable into the solution. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  18. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Transform the Non-Pivot Row (the other constraint row). New cell value = (old cell value) - (old Pivot Row value for the new cell's column x "ratio") Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  19. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 15 20 1 60 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Example: X variable column, 1st constraint row: Old cell value = 15 Old Pivot Row value for the new cell's column = 1 "ratio" = 4 New cell value = 15 - (1 x 4) = 11 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  20. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  21. Linear programming Simplex method - Example Maximize 2.5 X + 8 Y Subject to: 15 X + 20 Y  60 X + 5 Y  10 Where are we? Y X + 5 Y  10 X 15 X + 20 Y  60

  22. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row OCx = (Objective function value of variable X) - ((Columnx1 value) ("their value1")) - ((Columnx2 value) ("their value2")) ID Pivot Number Calc. "Ratio" OCx = (2.5) - ((11) (0)) - ((0.2) (8)) = 0.9 OCy = (8) - ((0) (0)) - ((1) (8)) = 0 Transform Pivot Row OCS1 = (0) - ((1) (0)) - ((0) (8)) = 0 Transform Non-Pivot Row(s) OCS2 = (0) - ((-4) (0)) - ((0.2) (8)) = -1.6

  23. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row 0.9 0 0 -1.6 Opportunity costs ID Pivot Number  Not the optimal solution, since some opportunity costs are > 0. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  24. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row 0.9 0 0 -1.6 Opportunity costs ID Pivot Number  Pivot Column is the column with the highest opportunity cost  Whichever variable that column refers to is "coming into the solution." Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  25. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Maximum contributions are the most that the variable represented by the Pivot Column can bring into the solution. Max contribution = (Q row / Pivot Column value row ) Calc. "Ratio" Transform Pivot Row MC constraint #1 = (20 / 11) = 1.8182 MC constraint #2 = (2 / 0.2) = 10 Transform Non-Pivot Row(s)

  26. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  The most of X that we can bring into the solution is 1.8182 units (related to constraint row #1). Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  27. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  The Pivot Row is the row related to the maximum contribution of variable X Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  28. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  The Pivot Number is the value of the cell at the intersection of the Pivot Row and the Pivot Column. Here, the Pivot Number = 11 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  29. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 11 0 1 -4 20 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  The "Ratio" for this simple 2-constraint problem is the value in the cell of the non-Pivot Row / Pivot Column (0.2) divided by the Pivot Number. Here, the "ratio" = (0.2 / 11) = 0.018182 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  30. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 S1 0 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Transform the Pivot Row by dividing all values in that row by the Pivot Number. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  31. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  This indicates that we are bringing the X variable into the solution. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  32. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Transform the Non-Pivot Row (the other constraint row). New cell value = (old cell value) - (old Pivot Row value for the new cell's column x "ratio") Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  33. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0.2 1 0.2 2 Y 8 ID Pivot Row ID Pivot Number  Example: X variable column, 2nd constraint row: Old cell value = 0.2 Old Pivot Row value for the new cell's column = 11 "ratio" = 0.018182 New cell value = 0.2 - (11 x 0.018182) = 0 Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  34. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0 1 -0.018 0.273 1.636 Y 8 ID Pivot Row ID Pivot Number  This indicates that we are bringing the X variable into the solution. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  35. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0 1 -0.018 0.273 1.636 Y 8 ID Pivot Row OCx = (Objective function value of variable X) - ((Columnx1 value) ("their value1")) - ((Columnx2 value) ("their value2")) ID Pivot Number Calc. "Ratio" OCx = (2.5) - ((1) (2.5)) - ((0) (8)) = 0 OCy = (8) - ((0) (2.5)) - ((1) (8)) = 0 Transform Pivot Row OCS1 = (0) - ((0.09) (2.5)) - ((-.018) (8)) = -0.081 Transform Non-Pivot Row(s) OCS2 = (0) - ((-0.364) (2.5)) - ((0.273) (8)) = -1.27

  36. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0 1 -0.018 0.273 1.636 Y 8 ID Pivot Row 0 0 -0.081 -1.27 Opportunity costs ID Pivot Number  The optimal solution, since no opportunity costs are > 0. Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  37. Create DCM Linear programming Simplex method - Example Calc. opportunity costs Optimal ? Yes Stop Variables in the solution No X Y S1 S2 Q Their value ID Pivot Column 2.5 8 1 0 0.09 -0.364 1.818 X 2.5 Calc. maximum contributions 0 1 -0.018 0.273 1.636 Y 8 ID Pivot Row Optimal solution: X = 1.818 Y = 1.636 Solution value = 1.818 (2.5) + 1.636 (8) = 17.633 ID Pivot Number Calc. "Ratio" Transform Pivot Row Transform Non-Pivot Row(s)

  38. Linear programming Simplex method - Example Maximize 2.5 X + 8 Y Subject to: 15 X + 20 Y  60 X + 5 Y  10 Where are we? Y X + 5 Y  10 X 15 X + 20 Y  60

More Related