Lecture 6: Algorithm Approach to LP Soln AGEC 352 Fall 2012 – Sep 12 R. Keeney Lab Discussion Questions Opportunity cost of specialization Total Gross Corner Point Chairs Tables Margin 1 45 0 2025 2 0 20 1600 3 24 14 2200 GM/unit 45 80 2200 – 2025 = 175 = Op cost chair spec 2200/45 = ? <- GM/chair required for spec to be equally profitable Linear Programming Corner Point Identification ◦ Solution must occur at a corner point ◦ Solve for all corners and find the best solution What if there were many (thousands) of corner points? ◦ Want a way to intelligently identify candidate corner points and check when we have found the best Simplex Algorithm does this… Assigned Reading 5 page handout posted on the class website ◦ Spreadsheet that goes with the handout Lecture today will point out the most important items from that handout Problem Setup Let: C = corn production (measured in acres) B = soybean production (measured in acres) The decision maker has the following limited resources: 320 acres of land 20,000 dollars in cash 19,200 bushels of storage The decision maker wants to maximize profits and estimates the following per acre net returns: C = $60 per acre B = $90 per acre Problem Setup (cont) The two crops the decision maker produces use limited resources at the following per acre rates: Resource Land Cash Storage Corn 1 50 100 Soybeans 1 100 40 Algebraic Form of Problem max 60C 90 B s.t. land : C B 320 cash : 50C 100 B 20,000 storage : 100C 40 B 19,200 non neg : C 0; B 0 Problem Setup in Simplex Note the correspondence between algebraic form and rows/columns Initial Tableau C land cash stor obj B 1 50 100 -60 s1 1 100 40 -90 s2 1 0 0 0 s3 0 1 0 0 P 0 0 1 0 RHS 0 320 0 20000 0 19200 1 0 Simplex Procedure: Perform some algebra that is consistent with equation manipulation ◦ Multiply by a constant ◦ Add/subtract a value from both sides of an equation Goal: Each activity column to have one cell with a 1 and the rest of its cells with 0 Result: A solution to the LP can be read from the manipulated tableau Simplex Steps The simplex conversion steps are as follows: 1) Identify the pivot column: the column with the most negative element in the objective row. 2) Identify the pivot cell in that column: the cell with the smallest RHS/column value. 3) Convert the pivot cell to a value of 1 by dividing the entire row by the coefficient in the pivot cell. 4) Convert all other elements of the pivot column to 0 by adding a multiple of the pivot row to that row. Step 1 B has the most negative ‘obj’ coefficient ◦ Most profitable activity Initial Tableau C land cash stor obj B 1 50 100 -60 s1 1 100 40 -90 s2 1 0 0 0 s3 0 1 0 0 P 0 0 1 0 RHS 0 320 0 20000 0 19200 1 0 Step 2 ID pivot cell: Divide RHS by elements in B column Most limiting resource identifcation Initial Tableau C land cash stor obj B 1 50 100 -60 s1 1 100 40 -90 s2 1 0 0 0 s3 0 1 0 0 P 0 0 1 0 RHS 0 320 0 20000 0 19200 1 0 320/1 20K/100 19200/40 Step 3 Convert pivot cell to value of 1 (*1/100) Initial Tableau C land cash stor obj B 1 50 100 -60 C new cash row s1 1 100 40 -90 B 0.5 s2 1 0 0 0 s1 1 s3 0 1 0 0 s2 0 P 0 0 1 0 s3 0.01 RHS 0 320 0 20000 0 19200 1 0 P 0 RHS 0 200 Step 4 Convert other elements of pivot col to 0, by multiplying the new cash row and adding to the other rows Multiplying factor for land row ◦ -1 (-1*1 + 1 = 0) Multiplying factor for stor row ◦ -40 (-40*1 + 40 = 0) Example C B s1 s2 s3 P RHS New cash row 0.5 1 0 0.01 0 0 200 New cash row *-1 -0.5 -1 0 -0.01 0 0 -200 Old land row 1 1 1 0 0 0 320 New land row 0.5 0 1 -0.01 0 0 120 Explanation of rows: New Cash Row: Multiply all elements by 1/100 New Cash Row *-1: Multiply new cash row by -1 Old Land Row: From initial tableau New Land Row: Add New cash row*-1 to old land row Tableau after 1st iteration C land cash stor obj B 0.5 0.5 80 -15 s1 0 1 0 0 s2 s3 1 -0.01 0 0.01 0 -0.4 0 0.9 P 0 0 1 0 RHS 0 120 0 200 0 11200 1 18000 IF all negative values are eliminated from obj row, we are done If negative values remain, repeat the four Simplex steps 1) New pivot column is C, …(see handout) Tableau after 2nd iteration of Simplex Final Tableau C land cash stor obj B 0 0 1 0 s1 0 1 0 0 s2 s3 P 1 -0.008 -0.00625 0 0.013 -0.00625 0 -0.005 0.0125 0 0.825 0.1875 RHS 0 50 0 130 0 140 1 20100 No negatives in obj row, so we are done. Solution values: Look under the activity column, find the one and read the corresponding RHS value: C = 140, B = 130, Slack Land = 50; P=Profit=20,100 Simplex Programmed into Excel as one of the solution options When we begin LP, we will make sure that we are choosing the simplex method Time consuming by hand but we need to understand how solutions are generated by the computer Key points for exam: ◦ Steps, reading a solution Next week Solving LP in Excel ◦ Standard problem setup ◦ Solution elements ◦ Interpretation of plan and evaluation of how sensitive the best plan is to changed assumptions
© Copyright 2026 Paperzz