Revised Primal Simplex Method Katta G
Total Page:16
File Type:pdf, Size:1020Kb
6.1 Revised Primal Simplex method Katta G. Murty, IOE 510, LP, U. Of Michigan, Ann Arbor First put LP in standard form. This involves floowing steps. • If a variable has only a lower bound restriction, or only an upper bound restriction, replace it by the corresponding non- negative slack variable. • If a variable has both a lower bound and an upper bound restriction, transform lower bound to zero, and list upper bound restriction as a constraint (for this version of algorithm only. In bounded variable simplex method both lower and upper bound restrictions are treated as restrictions, and not as constraints). • Convert all inequality constraints as equations by introducing appropriate nonnegative slack for each. • If there are any unrestricted variables, eliminate each of them one by one by performing a pivot step. Each of these reduces no. of variables by one, and no. of constraints by one. This 128 is equivalent to having them as permanent basic variables in the tableau. • Write obj. in min form, and introduce it as bottom row of original tableau. • Make all RHS constants in remaining constraints nonnega- tive. 0 Example: Max z = x1 − x2 + x3 + x5 subject to x1 − x2 − x4 − x5 ≥ 2 x2 − x3 + x5 + x6 ≤ 11 x1 + x2 + x3 − x5 =14 −x1 + x4 =6 x1 ≥ 1;x2 ≤ 1; x3;x4 ≥ 0; x5;x6 unrestricted. 129 Revised Primal Simplex Algorithm With Explicit Basis Inverse. INPUT NEEDED: Problem in standard form, original tableau, and a primal feasible basic vector. Original Tableau x1 ::: xj ::: xn −z a11 ::: a1j ::: a1n 0 b1 . am1 ::: amj ::: amn 0 bm c1 ::: cj ::: cn 1 α Initial Setup: Let xB be primal feasible basic vector and Bm×m be associated basis. Get augmented basic vector, listing −z as basic var. in bottom (objective) row. 0 1 B C B B C B 0 C B C Augmented Basis = B C @ A cB 1 0 1−1 0 1 B C B −1 C B B C B B C B 0 C B 0 C B C B C Inverse Tableau = B C = B C @ A @ A cB 1 −π 1 130 0 1 0 1 0 1 B C B C B C B x C B b C B ¯b C B B C B C B C B C B C B C Basic values = B C = (Inverse tableau) B C = B C @ −z A @ α A @ −z0 A where ¯b ≥ 0 by primal feasibility. Then information at this stage stored in form of a tableau, also called inverse tableau. Inverse tableau wrt xB Basic Inverse tableau Basic var. values ¯b1 . −1 xB B 0 ¯bi . ¯bm −z −π¯ 1 −z0 All nonbasics = 0 How to Update Inverse When a Column Changes? −1 m Bm×m, B available. Suppose B:j replaced by column d ∈ R 131 −1 leading to Bˆ. How to obtain Bˆ efficiently from B−1? This needs only one pivot step. Compute updated col. of d = representation of d in terms of −1 T B = B d = d¯ =(d¯1;:::;d¯m) ,say. −1 If d¯j =0,Bˆ does not exist because Bˆ is singular. If d¯j =6 0, put B−1 in a tableau, and d¯ on its RHS. Perform a GJ pivot step with d¯ as pivot column and d¯j as pivot element. This transforms B−1 into Bˆ −1. Example: 0 1 0 1 0 1 B C B C B C B − C B − C B C B 0 21C B 1 12C B 2 C B C B C B C B C B C B C B C −1 B C B C B B − C ;B B − − C ;j ;d B C = B 101 C = B 111 C =2 = B 0 C B C B C B C B C B C B C @ A @ A @ A 110 1 −22 1 132 General Iteration: • Compute rel. cost coeff. of nonbasic xj 0 1 B C B A C B :j C B C =¯cj = cj − πA:j =(−π, 1) B C @ A cj = dot product of last row of inverse tableau with original col. of xj. • OPT. CRITERION: If all nonbasicc ¯j ≥ 0, present BFS opt., terminate. • Otherwise, let E = {j :¯cj < 0}.Eachxj for j ∈ E is eligible to enter basic vector xB. Select one of them as ENTERING VARIABLE,sayxs. • Compute updated col. of xs = 0 1 0 1 B C B C B A¯ C B A C B :s C −1 B :s C B C B C B C = B B C : @ A @ A c¯s cs If A¯:s ≤ 0, terminate, z −→ − ∞ in the problem. If A¯:s 6≤ 0, perform pivot step by putting pivot col. = up- dated col. of xs on right side of inverse tableau, selecting pivot 133 row (dropping basic var.) by min ratio test, and performing a GJ pivot step. After piovot step, drop pivot col. and with new inverse tableau associated with new basic vector go to next iteration. Examples: Original tableau x1 x2 x3 x4 x5 x6 −z b 1000−1102 0100 1 1 01 0010 2 1 05 0001 0 1 00 0011−1 −810 xj ≥ 0 for all j,minz 134 Original tableau x1 x2 x3 x4 x5 x6 −z b 0011−1 −507 100−1 −1 −309 010−1 −1001 −1 −1 −1106410 xj ≥ 0 for all j,minz 135 6.8 Revised Primal Simplex Method With Explicit Basis Inverse. INPUT NEEDED: Problem in standard form, original tableau. INITIAL SETUP: Look for unit basic vector. If found, let it be xB. Starting with xB as feasible basic vector, apply revised simplex algo. to solve problem (called Phase II). If no unit basic vector, introduce nonnegative artificial variables with missing unit cols., and construct a unit basic vector with these artificial vars. in it. Let this basic vector be xB. Define dB = Basic phase I cost row vector (0 for original variables, 1 for artificial variables). Augmented basic vector for Phase I is (xB; −z;−w), where w = Phase I objective function = sum of artificial variables, an infeasibility measure of the present solution. 136 Phase I Original Tableau x1 ::: xj ::: xn −z −w a11 ::: a1m ::: a1n 00b1 . am1 ::: amj ::: amn 00bm c1 ::: cj ::: cn 10α 0 ::: 0 ::: 0010 Only original problem variables (including slack variables) are displayed in Phase I original tableau. Artificials will never be considered as entering vars., so their data not needed in original tableau. 137 Phase I Inverse tableau wrt xB Basic Inverse tableau Basic var. values ¯b1 . −1 xB B 00 ¯bi . ¯bm −z −π¯ 10 −z0 −w −σ 01 −w¯ All nonbasics = 0 σ is Phase I basic dual solution. Apply primal simplex algo. to solve Phase I problem (minimize w). During Phase I entering var. choosen using Phase I rel. cost coeffs. d¯j = (boottom row of inverse tableau)(col. of xj in Phase I original tableau) PHASE I TERMINATION CRITERION: d¯j ≥ 0 for all j =1 to n. 138 At Phase I termination: • if value of w>0, original model infeasible, terminate. Go to Infeasibility Analysis. • If value of w = 0, move from Phase I to Phase II to min original obj. func. z. Transition From Phase I to Phase II: • If all artificials left basic vector, delete last row (−w row) from inverse tableau, and the last col. ((m + 2)th) from inverse itself in final Phase I tableau. What remains is inverse tableau wrt present basic vector for original LP. Begin Phase II with it. • If some artificials still in basic vector, their values must be 0 (otherwise w =6 0). Fod any j with d¯j > 0, fix xj = 0 and delete it from further consideration from original tableau. Delete last row from inverse tableau, and last row from in- verse itself, and go to Phase II with resulting tableau. In this 139 process all artificials in basic vector will remain = 0, or leave basic vector. Examples Original Tableau x1 x2 x3 x4 x5 −z b 23 1−10 010 12−10105 1120004 1230010 xj ≥ 0 for all j, minimize z Original tableau x1 x2 x3 x4 x5 x6 −z b 1 −100 2 000 −2100−2000 10101−103 02112104 −40 −10 0 0 −7 −14 1 0 xj ≥ 0 for all j, minimize z 140 To Find a Feasible Solution of a System of Linear Constraints Gaussian elimination can find an unrestricted sol. of a system of linear eqs. When system involves ineq. constraints, and/or bounds on variables, to find a feasible sol. we put the system in standard form (eqs. in nonnegative vars.) and apply Phase I of simplex method to find a feasible sol. 141 6.14 Infeasibility Analysis Many ways to modify an infeasible model to a feasible one. In most applications, the preferred way is to alter the RHS constants. Most logical way is to change RHS constants, so that sum of absolute values of changes is minimum. Consider model in standard form: Ax = b; x ≥ 0, where T 0 0 0 b =(b1;:::;bm) .Letb =(b1;:::;bm) where 0 bi = bi if ith basic var. in final phase I tableau is an original problem var. (or slack) bi − vi if ith basic var. in final phase I tableau is an artificial var. with value vi Then changing b to b0 would convert the model into a feasible one while minimizing the sum of absolute changes. Examples: First problem considered under Simplex Method: b = (10; 5; 4)T . 142 Basic Inverse tableau Basic var. values t1 1 −1 −1 00 1 x2 01−1 00 1 x1 0 −1200 3 −z 0 −1010 −5 −w −11101 −1 b basic Inverse tableau 3 x6 110−1 −100 6 0 x10 0 −11 0 0 00 9 6 t3 0 221 000 4 7 x2 100−1100 5 10 t2 −2100 100 3 −z −1 −20 0 4 10−100 −w −2 −11−1001 −7 143 6.16 How to Compute Marginal Values (MV) in a General LP Model ? (P ) original LP Model.