
Appendix A THE SIMPLEX METHOD FOR LINEAR PROGRAMMING PROBLEMS A.1 Introduction This introduction to the simplex method is along the lines given by Chvatel (1983). Here consider the maximization problem: maximize Z = cT x such that Ax ≤ b, A an m × n matrix (A.1) xi ≥ 0,i=1, 2, ..., n. n Note that Ax ≤ b is equivalent to i=1 ajixi ≤ bj,j=1, 2, ..., m. Introduce slack variables xn+1,xn+2, ..., xn+m ≥ 0 to transform the © Springer International Publishing AG, part of Springer Nature 2018 341 J.A. Snyman and D.N. Wilke, Practical Mathematical Optimization, Springer Optimization and Its Applications 133, https://doi.org/10.1007/978-3-319-77586-9 342 APPENDIX A inequality constraints to equality constraints: a11x1 + ... + a1nxn + xn+1 = b1 a21x1 + ... + a2nxn + xn+2 = b2 . (A.2) am1x1 + ... + amnxn + xn+m = bm or [A; I]x = b T T where x =[x1,x2, ..., xn+m] , b =[b1,b2, ..., bm] ,andx1,x2, ..., xn ≥ 0 are the original decision variables and xn+1,xn+2, ..., xn+m ≥ 0 the slack variables. Now assume that bi ≥ 0 for all i, To start the process an initial feasible solution is then given by: xn+1 = b1 xn+2 = b2 . xn+m = bm with x1 = x2 = ···= xn =0. In this case we have a feasible origin. We now write system (A.2) in the so called standard tableau format: xn+1 = b1 − a11x1 − ...− a1nxn ≥ 0 xn+2 = b2 − a21x1 − ...− a2nxn ≥ 0 . (A.3) xn+m = bm − am1x1 − ...− amnxn ≥ 0 Z = c1x1 + c2x2 + ...+ cnxn The left side contains the basic variables, in general = 0, and the right side the nonbasic variables, all = 0. The last line Z denotes the objective function (in terms of nonbasic variables). SIMPLEX METHOD FOR LP PROBLEMS 343 In a more general form the tableau can be written as xB1 = b1 − a11xN1 − ...− a1nxNn ≥ 0 xB2 = b2 − a21xN1 − ...− a2nxNn ≥ 0 . (A.4) xBm = bm − am1xN1 − ...− amnxNn ≥ 0 Z = cN1xN1 + cN2xN2 + ...+ cNnxNn The ≥ at the right serves to remind us that xBj ≥ 0 is a necessary condition, even when the values of xNi change from their zero values. xB = vector of basic variables and xN = vector of nonbasic variables represent a basic feasible solution. A.2 Pivoting to increase the objective function Clearly if any cNp > 0, then Z increases if we increase xNp, with the other xNi =0,i = p. Assume further that cNp > 0andcNp ≥ cNi,i = 1, 2, ..., n, then we decide to increase xNp.ButxNp can not be increased indefinitely because of the constraint xB ≥ 0 in tableau (A.4). Every entry i in the tableau, with aip > 0, yields a constraint on xNp of the form: bi 0 ≤ xNp ≤ = di,i=1, 2, ..., m. (A.5) aip Assume now that i = k yields the strictest constraint, then let xBk =0 and xNp = dk.NowxBk(= 0) is the outgoing variable (out of the base), and xNp = dk(= 0) the incoming variable. The k-th entry in tableau (A.4) changes to xNp = dk − akixNi − akkxBk (A.6) i=k with aki = aki/akp, akk =1/akp. Replace xNp by (A.6) in each of the remaining m − 1 entries in tableau (A.4) as well as in the objective function Z. With (A.6) as the first entry this gives the new tableau in terms of the new basic variables: xB1,xB2,...,xNp, ..., xBm (left side) =0 344 APPENDIX A and nonbasic variables: xN1,xN2,...,xBk,...,xNn (right side) = 0. As xNp has increased with dk, the objective function has also increased by cNpdk. The objective function (last) entry is thus of the form Z = cNpdk + cN1xN1 + cN2xN2 + ···+ cNmxNm where the xNi now denotes the new nonbasic variables and cNi the new associated coefficients. This completes the first pivoting iteration. Repeat the procedure above until a tableau is obtain such that ∗ Z = Z + cN1xN1 + ···+ cNmxNm with cNi ≤ 0,i=1, 2, ..., m. The optimal value of the objective function is then Z = Z∗ (no further increase is possible). A.3 Example maximize Z =5x1 +4x2 +3x3 such that 2x1 +3x2 + x3 ≤ 5 4x1 + x2 +2x3 ≤ 11 3x1 +4x2 +2x3 ≤ 8 x1,x2,x3 ≥ 0. This problem has a feasible origin. Introduce slack variables x4,x5 and x6 and then the first tableau is given by: I: x4 =5− 2x1 − 3x2 − x3 ≥ 0 x1 ≤ 5/2(s) x5 =11− 4x1 − x2 − 2x3 ≥ 0 x1 ≤ 11/4 x6 =8− 3x1 − 4x2 − 2x3 ≥ 0 x1 ≤ 8/3 Z =5x1 +4x2 +3x3 Here 5 > 0and5> 4 > 3. Choose thus x1 as incoming variable. To find the outgoing variable, calculate the constraints on x1 for all the entries (see right side). The strictest (s) constraint is given by the first entry, SIMPLEX METHOD FOR LP PROBLEMS 345 and thus the outgoing variable is x4. The first entry in the next tableau is 5 3 1 1 x1 = 2 − 2 x2 − 2 x3 − 2 x4. Replace this expression for x1 in all other entries to find the next tableau: 5 3 1 1 x1 = 2 − 2 x2 − 2 x3 − 2 x4 ≥ 0 5 3 1 1 x5 =11− 4( 2 − 2 x2 − 2 x3 − 2 x4) − x2 − 2x3 ≥ 0 5 3 1 1 x6 =8− 3( 2 − 2 x2 − 2 x3 − 2 x4) − x4x2 − 2x3 ≥ 0 5 3 1 1 Z =5(2 − 2 x2 − 2 x3 − 2 x4)+4x2 +3x3 After simplification we obtain the second tableau in standard format: II: 5 3 1 1 x1 = 2 − 2 x2 − 2 x3 − 2 x4 ≥ 0 x3 ≤ 5 x5 =1+5x2 +2x4 ≥ 0 no bound 1 1 1 3 x6 = 2 + 2 x2 − 2 x3 + 2 x4 ≥ 0 x3 ≤ 1(s) 25 7 1 5 Z = 5 − 2 x2 + 2 x3 − 2 x4 This completes the first iteration. For the next step it is clear that x3 is the incoming variable and consequently the outgoing variable is x6. The first entry for the next tableau is thus x3 =1+x2 +3x4 − 2x6 (3-rd entry in previous tableau). Replace this expression for x3 in all the remaining entries of tableau II. After simplification we obtain the third tableau: III: x3 =1 + x2 +3x4 − 2x6 ≥ 0 x1 =2 − 2x2 − 2x4 + x6 ≥ 0 x5 =1 +5x2 +2x4 ≥ 0 Z =13− 3x2 − x4 − x6 In the last entry all the coefficients of the nonbasic variables are negative. Consequently it is not possible to obtain a further increase in Z by increasing one of the nonbasic variables. The optimal value of Z is thus Z∗ =13with ∗ ∗ ∗ x1 =2 ; x2 =0 ; x3 =1. 346 APPENDIX A Assignment A.1 Solve by using the simplex method: maximize z =3x1 +2x2 +4x3 such that x1 + x2 +2x3 ≤ 4 2x1 +3x3 ≤ 5 2x1 + x2 +3x3 ≤ 7 x1,x2,x3 ≥ 0. A.4 The auxiliary problem for problem with infeasible origin In the previous example it is possible to find the solution using the simplex method only because bi > 0 for all i and an initial solution xi =0,i=1, 2, ..., n with xn+j = bj,j=1, 2, ..., m was thus feasible, that is, the origin is a feasible initial solution. If the LP problem does not have a feasible origin we first solve the so called auxiliary problem: Phase 1: maximize W = −x0 n such that i=1 ajixi − x0 ≤ bj,j=1, 2, ..., m (A.7) xi ≥ 0,i=0, 1, 2, ..., n where x0 is called the new artificial variable. By setting xi =0for i =1, 2, ..., n and choosing x0 large enough, we can always find a feasible solution. The original problem clearly has a feasible solution if and only if the auxiliary problem has a feasible solution with x0 = 0 or, in other words, the original problem has a feasible solution if and only if the optimal value of the auxiliary problem is zero. The original problem is now solved using the simplex method, as described in the previous sections. This solution is called Phase 2. SIMPLEX METHOD FOR LP PROBLEMS 347 A.5 Example of auxiliary problem solution Consider the LP: maximize Z = x1 − x2 + x3 such that 2x1 − x2 + x3 ≤ 4 2x1 − 3x2 + x3 ≤−5 −x1 + x2 − 2x3 ≤−1 x1,x2,x3 ≥ 0. Clearly this problem does not have a feasible origin. We first perform Phase 1: Consider the auxiliary problem: maximize W = −x0 such that 2x1 − x2 +2x3 − x0 ≤ 4 2x1 − 3x2 + x3 − x0 ≤−5 −x1 + x2 − 2x3 − x0 ≤−1 x0,x1,x2,x3 ≥ 0. Introduce the slack variables x4,x5 and x6, which gives the tableau (not yet in standard form): x4 =4− 2x1 + x2 − 2x3 + x0 ≥ 0 x0 ≥−4 x5 = −5 − 2x1 +3x2 − x3 + x0 ≥ 0 x0 ≥ 5(s) x6 = −1+ x1 − x2 +2x3 + x0 ≥ 0 x0 ≥ 1 W = − x0 This is not in standard form as x0 on the right is not zero. With x1 = x2 = x3 = 0 then x4,x5,x6 ≥ 0ifx0 ≥ max{−4; 5; 1}. Choose x0 = 5, as prescribed by the second (strictest) entry. This gives x5 =0,x4 =9andx6 =4.Thusx0 is a basic variable (=0)and x5 a nonbasic variable. The first standard tableau can now be write as 348 APPENDIX A I: 5 x0 =5+2x1 − 3x2 + x3 + x5 ≥ 0 x2 ≤ 3 9 x4 =9 − 2x2 − x3 + x5 ≥ 0 x2 ≤ 2 x6 =4+3x1 − 4x2 +3x3 + x5 ≥ 0 x2 ≤ 1(s) W = −5 − 2x1 +3x2 − x3 − x5 Now apply the simplex method. From the last entry it is clear that W increases as x2 increases. Thus x2 is the incoming variable. With the strictest bound x2 ≤ 1 as prescribed by the third entry the outgoing variable is x6.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages31 Page
-
File Size-