12.07.2015 Views

Solving linear programming problems: the Simplex Method

Solving linear programming problems: the Simplex Method

Solving linear programming problems: the Simplex Method

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

FÖRELÄSNING 4(Chapter 4.8 - 4.10 )<strong>Solving</strong> <strong>linear</strong> <strong>programming</strong> <strong>problems</strong>: <strong>the</strong> <strong>Simplex</strong> <strong>Method</strong>4.6 Determining <strong>the</strong> starting feasible basic solution - The Two-Phase <strong>Method</strong>(Chapter4.9 in <strong>the</strong> book, p.113-117)Example 9 (Example in <strong>the</strong> Chapter 4.9 in <strong>the</strong> book, p.114)min z =2x 1 + x 2 + x 3s.t. 2x 1 − x 2 − x 3 ≥ 12x 1 + x 2 ≤ 5−x 2 + x 3 =1x 1 , x 2 , x 3 ≥ 0The standard form of <strong>the</strong> problem ismin z =2x 1 + x 2 + x 3s.t. 2x 1 − x 2 − x 3 − s 1 =12x 1 + x 2 + s 2 =5−x 2 + x 3 =1x 1 , x 2 , x 3 , s 1 , s 2 ≥ 0To find <strong>the</strong> starting feasible basic solution, we introduce artificial variables a 1 and a 3 to <strong>the</strong>first and <strong>the</strong> third constraints. The revised equations of <strong>the</strong> constraints become <strong>the</strong> following.2x 1 − x 2 − x 3 − s 1 + a 1 =12x 1 + x 2 + s 2 =5−x 2 + x 3 + a 3 =1x 1 , x 2 , x 3 , s 1 , s 2 , a 1 , a 3 ≥ 0Phase 1 :Minimizing <strong>the</strong> sum of <strong>the</strong> artificial variables with revised constraints.Phase 1 problem:min w = a 1 + a 3 (until a 1 = a 3 =0)s.t. 2x 1 − x 2 − x 3 − s 1 + a 1 =12x 1 + x 2 + s 2 =5−x 2 + x 3 + a 3 =1x 1 , x 2 , x 3 , s 1 , s 2 , a 1 , a 3 ≥ 01


<strong>Solving</strong> <strong>the</strong> Phase 1 problem will result in one of <strong>the</strong> following two cases:1. The optimal solution of <strong>the</strong> problem has value w =0, (a 1 = a 3 = 0), <strong>the</strong>n it is a feasiblebasic solution for <strong>the</strong> original problem.2. The optimal solution of <strong>the</strong> problem has value w>0, <strong>the</strong> original problem has no feasiblesolution.Notice thatThe Phase 1 problem is always a minimization problem no matter <strong>the</strong> original problem isa maximization or minimization problem.Phase 2: Drop <strong>the</strong> artificial variables. Starting from <strong>the</strong> feasible basic solution obtained at <strong>the</strong>end of phase 1, use <strong>the</strong> simplex method to solve <strong>the</strong> original problem.Phase 2 problem:min z =2x 1 + x 2 + x 3 (original objective function)s.t. 2x 1 − x 2 − x 3 − s 1 =12x 1 + x 2 + s 2 =5−x 2 + x 3 =1x 1 , x 2 , x 3 , s 1 , s 2 ≥ 0The detail calculation of <strong>the</strong> simplex iterations for Example 9 can be found in <strong>the</strong> book,p.115-117.4.7 The simplex tableau in matrix form (Chapter 4.8 in <strong>the</strong> book, p.110-113)In general, <strong>the</strong> standard form of an LP-problem can be written in <strong>the</strong> following matrix form:max (or min)s.t.c T xAx = bx ≥ 0where x =(x 1 ,...,x n ) T , c =(c 1 ,...,c n ) T , b =(b 1 ,...,b m ) T , 0 =(0,...,0) Tan (m × n) matrix.and A =[a ij ]isLet x =(x B , x N ) T , where x B is <strong>the</strong> vector of basic variables, and x N is <strong>the</strong> vector of nonbasicvariables,A =(B | N), where matrix B consists of <strong>the</strong> columns of A corresponding to <strong>the</strong> basic variables,and matrix N consists of <strong>the</strong> columns of A corresponding to <strong>the</strong> nonbasic variables,c =(c B , c N ) T , where c B is <strong>the</strong> vector of <strong>the</strong> objective function coefficients for <strong>the</strong> correspondingbasic variables in x B , and c N is <strong>the</strong> vector of <strong>the</strong> objective function coefficients for <strong>the</strong>corresponding nonbasic variables in x N .2


The initial simplex tableau in matrix form can be written as follows.Basvar z x T B x T N x T s¯bz 1 −c T B −c T N 0 T 0x s 0 B N I bwhere x s be <strong>the</strong> vector of <strong>the</strong> slack variables.At any iteration, <strong>the</strong> simplex tableau in matrix form becomesBasvar z x T B x T N x T s¯bz 1 0 T −(c T N − cT B B−1 N) c T B B−1 c T B B−1 bx B 0 I B −1 N B −1 B −1 bNotice thatIf x j is <strong>the</strong> slack variable in a ”≥” constraint, <strong>the</strong>n we should add a negative sign for <strong>the</strong>corresponding column in B −1 .Consider <strong>the</strong> following problem.Example 10max z =6x 1 + x 2 +4x 3 +5x 4s.t. 2x 1 + x 2 + x 3 + x 4 ≤ 20x 1 +2x 3 + x 4 ≤ 10x 1 + x 2 + x 3 ≤ 5x 1 , x 2 , x 3 , x 4 ≥ 0Let x 5 ,x 6 and x 7 denote <strong>the</strong> slack variables for <strong>the</strong> respective constraints. After <strong>the</strong> simplexmethod is applied, a portion of <strong>the</strong> final simplex tableau (optimal simplex tableau) is as follows.Basvar z x 1 x 2 x 3 x 4 x 5 x 6 x 7¯bz 1x 5 0 1 -1 -1x 4 0 0 1 -1x 1 0 0 0 1Identify <strong>the</strong> missing numbers in <strong>the</strong> simplex tableau, and indicate <strong>the</strong> optimal solution of <strong>the</strong>problem.3

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

Saved successfully!

Ooh no, something went wrong!