12.07.2015 Views

Simplex method in matrix form (revised simplex method) A LP with n ...

Simplex method in matrix form (revised simplex method) A LP with n ...

Simplex method in matrix form (revised simplex method) A LP with n ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Dr. Maddah ENMG 500 Eng<strong>in</strong>eer<strong>in</strong>g Management I 11/03/09<strong>Simplex</strong> <strong>method</strong> <strong>in</strong> <strong>matrix</strong> <strong>form</strong> (<strong>revised</strong> <strong>simplex</strong> <strong>method</strong>) A <strong>LP</strong> <strong>with</strong> n decision variables and m constra<strong>in</strong>ts can bewritten asmaxs.t.Z= cxAx = bx ≥ 0⎛ x1 ⎞ ⎡ a11 a12 K a1 n ⎤ ⎛ b1⎞⎜ ⎟ ⎢2a21 a22 a⎥ ⎜ ⎟2nb2where ( c1, c2, c3, , cn), ⎜x⎟, A ⎢Lc = K x = = ⎥,b = ⎜ ⎟⎜ M ⎟ ⎢ K K K K ⎥ ⎜ M ⎟⎜ ⎟ x ⎢a a K a ⎥⎜b⎟ Alternatively, the <strong>LP</strong> can be written as⎝ n ⎠ ⎣ m1 m2mn ⎦ ⎝ m ⎠maxs.t.Z = c x + c xB B N NBx + Nx = bBx ≥ 0where the subscripts “B” and “N” denote basic and nonbasicvariables respectively. For example,N(1)⎧max Z = 2x1 + 3x2 ⎧max Z = 2x1 + 3x2s.t. x1 + x2 ≤ 50 ⎪⎪ s.t. x1 + x2 + S1= 50⎨⇔ ⎨⎪ 2x1 + x2 ≤ 30 ⎪ 2 x1 + x2 + S2= 30⎪ x , x ≥ 0 ⎪⎩ x , x , S , S ≥ 0⎩ 1 21 2 1 21


Then, at O(0,0),⎛ S1 ⎞ ⎛ x1⎞ ⎛50⎞xB = ⎜ ⎟, xN = ⎜ ⎟, cN = (2,3), cB= (0,0), b = ⎜ ⎟⎝ S2 ⎠ ⎝ x2⎠⎝30⎠⎛1 0⎞ ⎛1 1⎞B = ⎜ ⎟,N = ⎜ ⎟⎝0 1⎠ ⎝ 2 1⎠ Solv<strong>in</strong>g for x B <strong>in</strong> (1) gives−1 −1max Z = cBB b − ( cBB N − cN ) xNs.t.x + B Nx = B bB−1 −1N( )Bx = b − Nx ⇒ x = B b − Nx = B b − B Nx−1 −1 −1B N B N N The <strong>LP</strong> can then be rewritten asx ≥ 0 Recall that each iteration of the <strong>simplex</strong> <strong>method</strong> allows anonbasic variable (the enter<strong>in</strong>g variable) to <strong>in</strong>crease from zero.until one of the basic variables (the leav<strong>in</strong>g variable) hits zero. Let N j be the j th column of N, and V i be the i th component ofvector V. Then, an iteration of the <strong>simplex</strong> <strong>method</strong>, <strong>with</strong> x jbe<strong>in</strong>g the basic variable and x i be<strong>in</strong>g basic variables, can berepresented by the follow<strong>in</strong>g equations:Z = c B b − ( c B N − c ) x ⇔ Z = Z − c x−1 −1 new 0 0B B j j j j jx = ( B b) − ( B N ) x ⇔ x = b − A x−1 −1 new 0 0i i j i j i i ij jwhere the superscripts “0” and “new” denote the currentsolution and the new solution generated by the next iteration.2


For a max problem, we choose the enter<strong>in</strong>g variable, x k , s.t.zk − ck = m<strong>in</strong>{ zj− cj| j is nonbasic and zj− cj< 0}, (2)where,−1z j B j≡ c B N .1 The leav<strong>in</strong>g variable is x r s.t.−1 −1( B b) r ⎪ ( B b)i−1 −1( B Nk) ( B Nk)r⎧⎫−1⎪= m<strong>in</strong> ⎨ i is basic and ( B Nj ) > 0⎬i. (3)⎪⎩i⎪⎭ The above provides the rational for the <strong>revised</strong> <strong>simplex</strong><strong>method</strong> which proceeds as followsStep 0. Determ<strong>in</strong>e a start<strong>in</strong>g basic feasible solution <strong>with</strong> basis Ω.Step 1. Evaluate B -1 .Step 2. Compute (z j − c j ) for all nonbasic variables. If (z j − c j ) ≥0for a maximization problem (≤ 0 for a m<strong>in</strong>imization), then stop.−1The optimal solution is xB* = B b, Z* = cBx B*. Else, determ<strong>in</strong>ethe enter<strong>in</strong>g variable, x k , us<strong>in</strong>g (2), and go to Step 3.Step 3. Compute B -1 N k . If all elements of B -1 N k ≤ 0, then stop, thesolution is unbounded. Else, compute B -1 b and determ<strong>in</strong>e theleav<strong>in</strong>g variable, x r , us<strong>in</strong>g (3).Step 4. determ<strong>in</strong>e the new basis, Ω new = Ω ∪ {x k } − {x r }. SetΩ = Ω new , and go to Step 1.1 This rule for choos<strong>in</strong>g the enter<strong>in</strong>g variable is just a rule of thumb. In some cases, there might be better ways tochoose the enter<strong>in</strong>g variable.3


• Example⎧max Z = 2x1 + 3x2 ⎧max Z = 2x1 + 3x2s.t. x1 + x2 ≤ 50 ⎪⎪ s.t. x1 + x2 + S1= 50⎨⇔ ⎨⎪ 2x1 + x2 ≤ 30 ⎪ 2 x1 + x2 + S2= 30⎪⎩ x1, x2≥ 0 ⎪⎩ x1 , x2, S1, S2≥ 0 Iteration 1.o Step 0. Start<strong>in</strong>g basic feasible solution at O(0,0),⎛ S1 ⎞ ⎛ x1⎞Ω = { S1, S2}, xB = ⎜ ⎟, xN = ⎜ ⎟, cN = (2,3), cB= (0,0),⎝ S2 ⎠ ⎝ x2⎠⎛1 0⎞ ⎛1 1⎞ ⎛50⎞B = ⎜ ⎟, N = ⎜ ⎟,b = ⎜ ⎟⎝0 1⎠ ⎝ 2 1⎠ ⎝30⎠o Step 1.−1 ⎛1 0⎞B = ⎜ ⎟⎝0 1⎠o Step 2.−1⎛1 0⎞⎛1⎞zx − c (0,0) 2 21 x= c1 BB Nx − c1 x=1 ⎜ ⎟⎜ ⎟ − = −⎝0 1⎠⎝ 2⎠−1⎛1 0⎞⎛1⎞zx − c (0,0) 3 32 x= c2 BB Nx − c2 x= − = −2 ⎜ ⎟⎜ ⎟⎝0 1⎠⎝1⎠The enter<strong>in</strong>g variable is x 2 .o Step 3.11 0 1 1 ( S1)− ⎛ ⎞⎛ ⎞ ⎛ ⎞B Nx=2 ⎜ ⎟⎜ ⎟ = ⎜ ⎟⎝0 1⎠⎝1⎠ ⎝1⎠( S2)11 0 50 50 ( S1)− ⎛ ⎞⎛ ⎞ ⎛ ⎞B b = ⎜ ⎟⎜ ⎟ = ⎜ ⎟⎝0 1⎠⎝30⎠ ⎝30⎠( S2)−1 −1( B b) S 50 ( B b)301 S2= = 50 , = = 30 .−1 −1B N 1 B N 1Then, ( x ) ( x )S2 21 2The leav<strong>in</strong>g variable is S 2 .o Step 4. The new basis is Ω = {S 1 , S 2 }∪ {x 2 } −{S 2 } ={S 1 , x 2 }.S4


Leav<strong>in</strong>g(block<strong>in</strong>g)variableIteration 1.Enter<strong>in</strong>g variablez j − c jBasic x 1 x 2 S 1 S 2 RHS RatioZ −2 −3 0 0 0 -S 1 1 1 1 0 50 50/1=50S 2 2 1 0 1 30 30/1=30−1( B b) i−1( B Nk)B −1iIteration 2.z j − c jc B B −1 bBasic x 1 x 2 S 1 S 2 RHSZ 4 0 0 3 90S 1 −1 0 1 −1 20x 2 2 1 0 1 30B −1 bB −16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!