Download Solving Linear Programming Problems with the Simplex Method: An Example and more Summaries Linear Programming in PDF only on Docsity! An example of LP problem solved by the Simplex Method Linear Optimization 2016 Fabio D'Andreagiovanni Exercise 1 Solve the following Linear Programming problem through the Simplex Method. max s.t 3x1 2x1 x1 2x1 x1 + + + + , x2 x2 2x2 2x2 x2 + + + + , 3x3 x3 3x3 x3 x3 ≤ ≤ ≤ ≥ 2 5 6 0 Solution The rst step is to rewrite the problem in standard form as follows: min s.t −3x1 2x1 x1 2x1 x1 − + + + , x2 x2 2x2 2x2 x2 − + + + , 3x3 x3 3x3 x3 x3 + , x4 x4 + , x5 x5 + , x6 x6 = = = ≥ 2 5 6 0 Having added the slack variables x4, x5, x6, it is easy to nd the following initial basis: B = [A4 A5 A6] = 1 0 0 0 1 0 0 0 1 and thus to split the decision variables in the following way: xB = x4 x5 x6 xN = x1 x2 x3 The solution associated with the basis B is x = (0, 0, 0, 2, 5, 6) with value z = 0. We can then dene the following simplex tableau: 0 -3 -1 -3 0 0 0 2 2 1 1 1 0 0 5 1 2 3 0 1 0 6 2 2 1 0 0 1 The rst thing to do is checking the value of the reduced costs in the 0th-row: if all reduced costs are non-negative, then we have a sucient condition of optimality and the solution associated with the current basis is optimal. In our case, three variables, namely x1, x2, x3 are associated with the negative reduced costs (-3, -1, -3). The sucient condition is thus not satised and we thus proceed to operate a change of basis. Following Bland's rule, we choose as variable entering the basis that with the smallest subscript: we then choose xj with j = min{k : c̄k < 0} = min{1, 2, 3} = 1. Therefore, x1 enters the basis and column 1 of the tableau is the pivot column. 1 Simplex Method - Exercises Looking at the entries of the pivot column, we can then derive the value θ∗ considering the values associated with the basic variables So we have: θ = min k=1,2,3:uk>0 { xk uk } = min { 2 2 , 5 1 , 6 2 } = 1 So the minimum is attained for variable x4 and x4 exits the basis. The pivot row is thus the row 1 of the tableau and the pivot element is that at the intersection of row 1 and column 1. In order to get the new tableau corresponding to the new basis: B = [A1 A5 A6] = 2 0 0 1 1 0 2 0 1 we operate the following row operations, aimed at transforming the rst column (2 1 2)T of the tableau into the column (1 0 0)T using the entries of the pivot row (all entries but the pivot element must become null, while the pivot element must become equal to 1): • R0 ←− R0 + 3 2 R1 • R1 ←− 1 2 R1 • R2 ←− R2 − 1 2 R1 • R3 ←− R3 −R1 The new tableau that we obtain is: 3 0 1/2 -3/2 3/2 0 0 1 1 1/2 1/2 1/2 0 0 4 0 3/2 5/2 -1/2 1 0 4 0 1 0 -1 0 1 associated with the solution (1, 0, 0, 0, 4, 4) of value z = −3. Again, we look at the 0-th row to check the presence of negative reduced costs. We have a single variable associated with negative reduced cost, namely x3. Thus x3 enters the basis and the third column of the tableau becomes the pivot column. We derive again the value θ considering the values associated with the basic variables So we have: θ = min k=1,2,3:uk>0 { xk uk } = min { 1 1 2 , 4 5 2 } = 8 5 The minimum is then attained for variable x5 and x5 exits the basis. The pivot row is thus the row 1 of the tableau and the pivot element is that at the intersection of row 1 and column 3. In order to get the new tableau corresponding to the new basis: B = [A1 A3 A6] = 2 1 0 1 3 0 2 1 1 we operate the following row operations, aimed at transforming the third column (1/2 5/2 0)T of the tableau into a column (1 0 0)T using the entries of the pivot row (all entries but the pivot element must become null, while the pivot element must become equal to 1): • R0 ←− R0 + 3 5 R2 • R1 ←− R1 − 1 5 R2 Page 2