Public Policy Modeling Simplex Method Wednesday, March 16, 2016 Hun Myoung Park, Ph.D. Public Management & Policy Analysis Program Graduate School of International Relations Simplex Method • Algorithm to solving LP problems. • Developed by George Dantzig in 1947 • Search for optimal solution by examining corner point feasible solutions (corner solutions) • Iteration algorithm keeps searching until finding the optimal solution. • Efficient algorithm to reach the optimal solution by focusing on corner solutions • Informative to provide valuable information such as shadow price (sensitivity analysis) 2 Augmented Form 1 • Convert the functional inequality constraints to equivalent equality constraints by introducing slack variables Original form Max Z=3x1+5x2, Subject to x1 <= 4 2x2 <= 12 3x1 + 2x2 <= 18 Augmented form Z-3x1-5x2=0 Subject to x1 + s 1 = 4 2x2 + s2 = 12 3x1 + 2x2 + s3 = 18 3 Augmented Form 2 • The original form has been augmented by some supplementary variables (slack variables) • Augmented solution is a solution for the original variables that has been augmented by the corresponding values of the slack variables. • Basic solution is an augmented corner-point solution and • Basic feasible (BF) solution is an augmented corner point feasible (CPF) solution 4 Simplex Method 1 • • • • • • • • Tabular form is often used Use augmented form with equality constraints Construct a simplex tableau A simplex tableau summarizes coefficients in the middle and result values on the right side Objective function Z always appears on the top. The Z value appear on the right side column Right side contains the (initial) basic feasible solution. See Excel Worksheet for an example. 5 Simplex Method 2 • An example of an Initial Simplex Tableau Basic Coefficients RHS Z x1 x2 s1 s2 s3 Z 1 -3 -5 0 0 0 0 S1 0 1 0 1 0 0 4 S2 0 0 2 0 1 0 12 S3 0 3 2 0 0 1 18 6 Simplex Method 4 • InitializationOptimality TestIteration Optimality test… Initialization: construct the initial simplex tableau – Decision variables remain nonbasic variables (set equal to zero) – Slack variables become basic variables that appear on the left. • Optimality test: if and only if every coefficient in row for Z is nonnegative (>=0) current BF solution is optimal. Otherwise, go to an iteration. 7 Simplex Method 5 • Iteration 1: determine the entering basic variable (to be basic variables in the next iteration) with the negative coefficient having the largest absolute value. The column for such variable is called pivot column. • Iteration 2: determine the leaving basic variable (to be nonbasic variables in the next iteration) using minimum ratio test. • See pp.103-107 of Hillier & Lieberman (2010) 8 Simplex Method 6 • Minimum ratio test: – Pick out each positive (>0) coefficient in the pivot column – Divide right side values by positive coefficients – Identify the row having the smallest ratio – The row (basic variable) is leaving basic variable and is called pivot row. – The value in pivot column and row is pivot number. • Minimum ratio test determine which basic variable drops to zero first as the entering basic variable is increased. 9 Simplex Method 7 • Iteration 3: solve for the new basic feasible solution by Gauss-Jordan method of elimination – Divide the pivot row by the pivot number – Identify a row other than pivot row that has nonzero coefficient in the pivot column – Multiply the pivot row by the coefficient and then subtract the pivot row from the row of interest. – Repeat it to other row having nonzero coefficient in the pivot column • Optimality Test to see if every coefficients in row Z are nonnegative. 10 Further Directions • • • • Duality Theory: primal versus dual problem Transportation and Assignment Integer (Binary) Programming Goal Programming 11