Simplex Method Review Canonical Form T max c x s.t. Ax b x0 • A is m x n • Theorem 7.5: If an LP has an optimal solution, then at least one such solution exists at a basic feasible solution (BFS). • For LP in canonical form a BFS is a solution for which there are m basic variables and n-m nonbasic variables • Columns of A associated with basic variables (denoted by B) are linearly independent, xN = 0, xB uniquely solve B xB=b and xB 0. Matrix Representation cB xB A [ B : N ], c , x cN xN T T max cB xB cN xN s.t. BxB NxN b xB 0 xN 0 Initial Solutions If b 0 in max cT x s.t. Ax b x0 then the origin is a BFS. Thus, in canonical form we have max cT x s.t. Ax Is b x, s 0, and the solution ( x, s) (0, b) is a BFS with basic variables s, and hence is a possible starting point for the simplex method. Feasible Directions Since we have Ax b, every feasible direction d must satisfy Ad 0. Simplex Direction: A simplex direction d k corresponding to the nonbasic variable xk is a direction vector where (1) d kk 1 (2) d kj 0 for all other nonbasic variables x j xk (3) each dik component corresponding to the basic variables xi is (uniquely) determined by solving Ad 0. Determining Improving Directions Reduced Cost: The reduced cost ck associated with the nonbasic variable xk is ck cT d k ck ci dik , iB where d k is the simplex direction associated with variable xk and B is the set of basic variables. The simplex direction d k associated with nonbasic variable xk is an improving direction if (1) ck 0 for a maximization problem; (2) ck 0 for a minimization problem. More Than One Improving Direction • We will use a greedy rule for selecting our improving simplex direction. • For a maximization problem, we choose the simplex direction whose reduced cost is most positive. • For a minimization problem, we choose the simplex direction whose reduced cost is most negative. • Rule is called the Dantzig rule after George Dantzig, the founder of the simplex method. No Improving Direction • Optimality Condition for an LP (Exercise 8.26): If the simplex method does not identify a simplex direction that is improving, the current solution is a global optimal solution to the LP. Determining Maximum Step Size Ratio Test: Starting at the basic feasible solution x, if any coordinate of the improving simplex direction d k is negative, the maximum step size is max x j k min k : d j 0 . d j Test for Unbounded Linear Programs: If all coordinates of an improving simplex direction d are nonnegative, then the linear program is unbounded. Updating the Basis • The nonbasic variable corresponding to the chosen simplex direction enters the basis and becomes basic. • Any one of the (possibly several) basic variables that define the maximum step size will leave the basis and become nonbasic. Basic Simplex Method Step 0 : Initialization. Identify a basic feasible solution x (0) , and set solution index t 0. Step 1 : Construct Simplex Directions. For each nonbasic variable x j , construct the corresponding simplex direction d j using Bd Bk ak and its reduced cost c j . Step 2 : Optimality Check. If no simplex direction is improving, STOP. The current solution x (t ) is optimal. Otherwise, choose any improving simplex direction as d , and let xe denote the entering variable. Step 3 : Compute Maximum Step Size. If d 0, stop. The LP is unbounded. Otherwise, choose the leaving value xl by computing the maximum step size according to the Ratio Test. Step 4 : Update Solution and Basis. Compute the new solution x (t 1) x (t ) max d and replace xl by xe in the basis. Set t t 1 and return to Step 1.