The Theory of the Simplex Method

22
Foundations-1 The Theory of the Simplex The Theory of the Simplex Method Method

description

The Theory of the Simplex Method. The Essence. Simplex method is an algebraic procedure However, its underlying concepts are geometric Understanding these geometric concepts helps before going into their algebraic equivalents - PowerPoint PPT Presentation

Transcript of The Theory of the Simplex Method

Page 1: The Theory of the Simplex Method

Foundations-1

The Theory of the Simplex MethodThe Theory of the Simplex Method

Page 2: The Theory of the Simplex Method

Foundations-2

The EssenceThe Essence

• Simplex method is an algebraic procedure• However, its underlying concepts are geometric• Understanding these geometric concepts helps before

going into their algebraic equivalents• With two decision variables, the geometric concepts are

easy to visualize• Should understand the generalization of these concepts

to higher dimensions

Page 3: The Theory of the Simplex Method

Foundations-3

Standard (Canonical) Form of an LP ModelStandard (Canonical) Form of an LP Model

Maximize Z = c1x1 + c2x2 + … + cnxn

subject to a11x1 + a12x2 + … + a1nxn ≤ b1

a21x1 + a22x2 + … + a2nxn ≤ b2

…am1x1 + am2x2 + … + amnxn ≤ bm

x1 ≥ 0, x2 ≥ 0, …, xn ≥ 0

Page 4: The Theory of the Simplex Method

Foundations-4

Extended TerminologyExtended Terminology

max cx n variabless.to Ax b m inequalities

x 0 n inequalities

max cx n+m variabless.to Ax + Ixs = b m equations

x, xs 0 n+m inequalities

• Constraint boundary equation– For any constraint, obtain by replacing its , =, by =– It defines a “flat” geometric shape: hyperplane

• Corner-point solution– Simultaneous solution of n constraint boundary equations

( )

Page 5: The Theory of the Simplex Method

Foundations-5

Extended TerminologyExtended Terminology

max cx + 0xs n+m variabless.to Ax + Ixs = b m equations

x, xs 0 n+m inequalities

• Indicating variables (in the augmented form)

Original Constraint in Augmented Form

Constraint Boundary Equation Indicating Variable

xj 0 (j=1,2,…,n)

xj = 0 xj

(i=1,2,…,m)

xsn+iisin

n

jjij bxxa

1i

n

jjij bxa

1

Page 6: The Theory of the Simplex Method

Foundations-6

' '1 2 3 3

1 11

2 22

3 ' ' 33

Max 0 0 variables

s.to = equations

= equations

- + equations

, ,

s a s a

s

a

s a

s a

cx x Mx x Mx n m m m m

A x Ix b m

A x Ix b m

A x Ix Ix b m

x x x ' '1 2 3 3, , 0 inequalities s ax x n m m m m

Page 7: The Theory of the Simplex Method

Foundations-7

Original Constraint

Original Constraint in Augmented Form

Constraint Boundary Equation

Indicating Variable

xj 0 xj 0 xj = 0 xj

(i=1,2,…,m1)

(i=1,2,…,m2)

(i=1,2,…,m3)

Indicating variables, overallIndicating variables, overall

' ' s an i n ix x

sn ix1 1

1

n

sij j n i i

j

a x x b 1 1

1

n

ij j ij

a x b1 1

1

n

ij j ij

a x b

2 2

1

n

ij j ij

a x b

3 3

1

n

ij j ij

a x b

2 2

1

n

aij j n i i

j

a x x b

3 ' ' 3

1

n

s aij j n i n i i

j

a x x x b

2 2

1

n

ij j ij

a x b

3 3

1

n

ij j ij

a x b

an ix

Page 8: The Theory of the Simplex Method

Foundations-8

Properties of CPF (BF) SolutionsProperties of CPF (BF) Solutions

Property 1:a. If there is exactly one optimal solution, then it must be a

corner-point feasible solutionb. If there are multiple optimal solutions (and a bounded

feasible region), then at least two must be adjacent corner-point feasible solutions

Proof of (a) by contradiction

Page 9: The Theory of the Simplex Method

Foundations-9

Properties of CPF (BF) SolutionsProperties of CPF (BF) Solutions

Property 2:There are only a finite number of corner-point feasible solutions

max cx n variabless.to Ax b m inequalities

x 0 n inequalities

CP solution is defined as the intersection of n constraint boundary equations(n+m) choose n:

!m!n)!mn(

nmn

Upper bound on # of CPF solutions

Page 10: The Theory of the Simplex Method

Foundations-10

Properties of CPF (BF) SolutionsProperties of CPF (BF) Solutions

Property 3:a. If a corner-point feasible solution has no adjacent CPF

solution that are better, then there are no better CPF solutions elsewhere

b. Hence, such a CPF solution is an optimal solution (assuming LP is feasible and bounded)

Page 11: The Theory of the Simplex Method

Foundations-11

Simplex in Matrix (Product) Form Simplex in Matrix (Product) Form

max cx n variabless.to Ax b m inequalities

x 0 n inequalities

max cx m+n variabless.to Ax + Ixs = b m equations

x, xs 0 m+n inequalities

Initial Tableau:

( )B.V.

Original Variables Slack Variablesr.h.s.

x1 x2 … xn xsn+1 … xs

n+m

Z -c 0 0xs

n+1

A I b…

xsn+m

XB=

Page 12: The Theory of the Simplex Method

Foundations-12

Simplex in Matrix (Product) Form Simplex in Matrix (Product) Form

Intermediate iterations:• Let B denote the square matrix that contains the columns from

[ A | I ] that correspond to the current set of basic variables, xB (in order)

• Similarly, let cB be the vector of elements in c that correspond to xB

• Then at any intermediate step, the simplex tableau is given by

B.V.Original Variables Slack Variables

r.h.s.x1 x2 … xn xs

n+1 … xsn+m

Z cBB-1A-c cBB-1 cBB-1b

xB B-1A B-1 B-1b

Page 13: The Theory of the Simplex Method

Foundations-13

Revised Simplex MethodRevised Simplex Method

• InitializationFind an initial BFS (if one not immediately available, do Phase 1. If Phase 1 terminates with z1>0, LP is infeasible)

• Optimality testCalculate cBB-1A-c for basic, and cBB-1 for nonbasic variables. If all ≥ 0, stop with optimality

• Iterative step– Determine the entering variable as before (steepest ascent)– Let xk be the entering variable– Determine the leaving variable as before (minimum ratio test), but now only need to

calculate the coefficients of the pivot column (from B-1A or B-1) and the updated rhs (B-1b)– Let xl : the leaving variable

r : the equation number of the leaving variablea’rk : coefficient of xk in rth equation (the pivot element)

– Determine B-1new=E B-1

old where E is I expect for rth column replaced with

– Can calculate the new BFS using xB=B-1b and z=cBB-1b – Back to optimality test

ri if'a1

ri if'a'a

,

rk

rk

ik

i

m

1

Page 14: The Theory of the Simplex Method

Foundations-14

Revised Simplex ExampleRevised Simplex Example

Original data:

Maximize z = 2x1+ 3x2

subject to x1 + 2x2 +s1 = 103x1+ x2 +s2 = 15

x2 +s3 = 4

x1,x2, s1, s2, s3 ≥ 0

41510

b 101321

A

32c

Maximize z = 2x1+ 3x2

subject to x1 + 2x2 ≤ 10

3x1+ x2 ≤ 15

x2 ≤ 4

x1,x2 ≥0

Page 15: The Theory of the Simplex Method

Foundations-15

Iteration 0Iteration 0

bBcz

bBx

B B x

1-B

1-B

1-B

Page 16: The Theory of the Simplex Method

Foundations-16

Iteration 0Iteration 0

• Calculate row-0 coefficients:cBB-1A-c =

cBB-1 =

Optimal?• Entering variable is• Calculate coefficients in pivot column using B-1A or B-1

• Calculate updated rhs using B-1b, do the ratio test

• Leaving variable is• Update B-1

Page 17: The Theory of the Simplex Method

Foundations-17

Iteration 1Iteration 1

bBcz

bBx

B B x

1-B

1-B

1-B

Page 18: The Theory of the Simplex Method

Foundations-18

Iteration 1Iteration 1

• Calculate row-0 coefficients:cBB-1A-c =

cBB-1 =

Optimal?• Entering variable is• Calculate coefficients in pivot column using B-1A or B-1

• Calculate updated rhs using B-1b, do the ratio test

• Leaving variable is• Update B-1

Page 19: The Theory of the Simplex Method

Foundations-19

Iteration 2Iteration 2

bBcz

bBx

B B x

1-B

1-B

1-B

Page 20: The Theory of the Simplex Method

Foundations-20

Iteration 2Iteration 2

• Calculate row-0 coefficients:cBB-1A-c =

cBB-1 =

Optimal?• Entering variable is• Calculate coefficients in pivot column using B-1A or B-1

• Calculate updated rhs using B-1b, do the ratio test

• Leaving variable is• Update B-1

Page 21: The Theory of the Simplex Method

Foundations-21

Iteration 3Iteration 3

bBcz

bBx

B B x

1-B

1-B

1-B

Page 22: The Theory of the Simplex Method

Foundations-22

Iteration 3Iteration 3

• Calculate row-0 coefficients:cBB-1A-c =

cBB-1 =

Optimal?• Entering variable is• Calculate coefficients in pivot column using B-1A or B-1

• Calculate updated rhs using B-1b, do the ratio test

• Leaving variable is• Update B-1