0% found this document useful (0 votes)
46 views

Module 07 PDF

Uploaded by

Prajith V R
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Module 07 PDF

Uploaded by

Prajith V R
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Quantitative Analysis for Management

Thirteenth Edition

Module 7
Linear Programming: The
Simplex Method

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Learning Objectives
After completing this module, students will be able to:
M7.1 Convert LP constraints to equalities with slack,
surplus, and artificial variables.
M7.2 Set up and solve LP maximization problems with
simplex tableaus.
M7.3 Interpret the meaning of every number in a simplex
tableau.
M7.4 Set up and solve LP minimization problems with
simplex tableaus.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

1
Module Outline
M7.1 How to Set Up the Initial Simplex Solution
M7.2 Simplex Solution Procedures
M7.3 Surplus and Artificial Variables
M7.4 Solving Minimization Problems

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Introduction
• Most real-life LP problems have more than two variables
and cannot be solved using the graphical procedure
• The simplex method
• Examines the corner points in a systematic fashion
– An iterative process
– Each iteration improves the value of the objective
function
– Yields optimal solution and other valuable economic
information

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

2
How to Set Up the Initial Simplex Solution
• Flair Furniture Company problem
T = number of tables produced
C = number of chairs produced

Maximize profit = $70T + $50C (objective function)

subject to 2T + 1C ≤ 100 (painting hours constraint)


4T + 3C ≤ 240 (carpentry hours constraint)
T, C ≥ 0 (nonnegativity constraints)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Converting the Constraints to Equations (1 of


3)

• Convert inequality constraints into an equation


• Add a slack variable to less-than-or-equal-to constraints
S1 = slack variable representing unused hours in the
painting department
S2 = slack variable representing unused hours in the
carpentry department
2T + 1C + S1 = 100
4T + 3C + S2 = 240

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

3
Converting the Constraints to Equations (2 of
3)

• If Flair produces T = 40 and C = 10


2T + 1C + S1 = 100
2(40) + 1(10) + S1 = 100
S1 = 10

• Adding all variables into all equations,


2T + 1C + 1S1 + 0S2 = 100
4T + 3C + 0S1 + 1S2 = 240
T, C, S1, S2 ≥ 0

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Converting the Constraints to Equations (3 of


3)

Objective function becomes


Maximize profit = $70T + $50C + $0S1 + $0S2

• Adding all variables into all equations,


2T + 1C + 1S1 + 0S2 = 100
4T + 3C + 0S1 + 1S2 = 240
T, C, S1, S2 ≥ 0

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

4
Iterative Nature of simplex method
• The simplex method visits each corner point to improve the
value of the objective function.
• The design of simplex method calls for increasing one
variable at a time, with the selected variable being the
largest rate of improvement of the objective function.
• Starting at the origin T=0 and C=0 the objective function
(z= $70T + $50C) will increase by 70 for each unit in T
and by 50 for each unit in C.
• We will select the largest rate of improvement in this case
T.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Basic Variable and Nonbasic variables


• Nonbasic variable are the ones set to be Zero.
• Basic variables can be defined as the variables which can
take any value other than zero.
• At the origin of the feasible region
T=0 C=0 – Nonbasic variables
S1 and S2- Basic variables

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

10

5
Simplex Tableau (Basic Solution)
Max z = $70T + $50C + $0S1 + $0S2
s.t.
2T + 1C + 1S1 + 0S2 = 100
4T + 3C + 0S1 + 1S2 = 240
T, C, S1, S2 ≥ 0
Write the objective as equation

Z - 70T – 50C = 0

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
s1 0 2 1 1 0 100
s2 0 4 3 0 1 240

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

11

Simplex Tableau
• Is the current solution optimal? (maximization problem)
– We can improve the solution by increasing T or C.

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
s1 0 2 1 1 0 100
s2 0 4 3 0 1 240

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

12

6
Simplex Tableau
• The entering variable (to the base) will correspond with the
most negative coefficient in the objective function.

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
s1 0 2 1 1 0 100
s2 0 4 3 0 1 240

• This rule is referred to as the optimality condition.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

13

Simplex Tableau
• Determine the leaving variable from the simplex tableau.
• Compute the nonnegative ratios of the right-hand side of
the equations (RHS) to the corresponding constraint
coefficients under the entering variable
• Selects the minimum nonnegative ratio
Minimum
Basic z T C S1 S2 RHS ratio = S1
z 1 -70 -50 0 0 0
S1 0 2 1 1 0 100 𝑇=
S2 0 4 3 0 1 240 𝑇=
• The rule associated with the ratio computations is referred to as the feasibility condition

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

14

7
Simplex Tableau
Important note:
• At the feasibility condition ignore :
– Negative ratios
– Denominator with a “0”

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

15

Simplex Tableau
• The new solution point is determined by swapping the
entering variable T and the leaving variable S1.
• The swapping process is based on the Gauss-Jordan row
operations. It identifies the entering variable column as the
pivot column and the leaving variable row as the pivot
row.
• The intersection of the pivot column and the pivot row is
called the pivot element.
Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
S1 0 2 1 1 0 100
S2 0 4 3 0 1 240

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

16

8
Simplex Tableau

Enter

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
Leave S1 0 2 1 1 0 100 Pivot Row

S2 0 4 3 0 1 240

Pivot Pivot
Column element

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

17

Simplex Tableau
• The Gauss-Jordan computations needed to produce the
new basic solution include two types.
1. Pivot row
a) Replace the leaving variable in the Basic column with the entering
variable.
b) New pivot row = Current pivot row ÷ Pivot element

2. All other rows, including z

New row = (Current row) - (pivot column coefficient) X (New pivot row)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

18

9
Simplex Tableau
Basic z T C S1 S2 RHS
Current z 1 -70 -50 0 0 0
S1 0 2 1 1 0 100
S2 0 4 3 0 1 240

Replace S1 with T and new T row = Current S1 ÷ 2

Basic z T C S1 S2 RHS
z
New
T 0 1 1/2 1/2 0 50
S2

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

19

Simplex Tableau
• Generate “zeros” below and above Pivot element by

New row = (Current row) - (pivot column coefficient) X (New pivot row)

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
Current
S1 0 2 1 1 0 100
S2 0 4 3 0 1 240

Basic z T C S1 S2 RHS
z
New
T 0 1 1/2 1/2 0 50
S2

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

20

10
Simplex Tableau
• Generate “zeros” below and above Pivot element by

New row = (Current row) - (pivot column coefficient) X (New pivot row)

Basic z T C S1 S2 RHS
z 1 -70 -50 0 0 0
Current
S1 0 2 1 1 0 100
S2 0 4 3 0 1 240

Basic z T C S1 S2 RHS
z 1 0 -15 35 0 3500
New
T 0 1 1/2 1/2 0 50
S2 0 0 1 -2 1 40

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

21

Simplex Tableau
• Check Optimality
– C can enter to the base (still negative values in z row
for nonbasic variables)
Basic z T C S1 S2 RHS
z 1 0 -15 35 0 3500
Current
T 0 1 1/2 1/2 0 50
S2 0 0 1 -2 1 40

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

22

11
Simplex Tableau
• Check Feasibility (Ratios)

Basic z T C S1 S2 RHS Ratio


z 1 0 -15 35 0 3500 -
Current 50/(1/2)=
T 0 1 1/2 1/2 0 50 100
S2 0 0 1 -2 1 40 40/1=40

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

23

Simplex Tableau
• Check Feasibility (Ratios)
Enter Minimum
ratio = S2

Basic z T C S1 S2 RHS Ratio


z 1 0 -15 35 0 3500 -
Current 50/(1/2)=
T 0 1 1/2 1/2 0 50 100
Leave S2 0 0 1 -2 1 40 40/1=40

Gauss-Jordan computations needed to produce the new


basic

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

24

12
Simplex Tableau
Gauss-Jordan computations needed to produce the new basic

Basic z T C S1 S2 RHS
z 1 0 -15 35 0 3500
Current
T 0 1 1/2 1/2 0 50
S2 0 0 1 -2 1 40

Basic z T C S1 S2 RHS
z
New
T
C

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

25

Simplex Tableau
Gauss-Jordan computations needed to produce the new basic

Basic z T C S1 S2 RHS
z 1 0 -15 35 0 3500
Current
T 0 1 1/2 1/2 0 50
S2 0 0 1 -2 1 40

Basic z T C S1 S2 RHS
z 1 0 0 5 15 4100
New
T 0 1 0 3/2 -1/2 30
C 0 0 1 -2 1 40

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

26

13
Simplex Tableau
• Check Optimality
– None of the z-row coefficients associated with the
nonbasic variables, s1 and s2, are negative. Hence,
the last tableau is optimal

Basic z T C S1 S2 RHS
z 1 0 0 5 15 4100
T 0 1 0 3/2 -1/2 30
C 0 0 1 -2 1 40

Optimal Solution
T= 30
C= 40
Z=profit= 4,100
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

27

Simplex method - Summary (Maximization)


• Optimality condition. The entering variable in a
maximization problem is the nonbasic variable having the
most negative coefficient in the z-row. Ties are broken
arbitrarily. The optimum is reached at the iteration where
all the z-row coefficients of the nonbasic variables are
nonnegative.
• Feasibility condition. For maximization, the leaving
variable is the basic variable associated with the smallest
nonnegative ratio (with strictly positive denominator). Ties
are broken arbitrarily.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

28

14
Simplex method - Summary (Maximization)

Gauss-Jordan row operations.


1. Pivot row
a) Replace the leaving variable in the Basic column
with the entering variable.
b) New pivot row = Current pivot row ÷ Pivot element
2. All other rows, including z

New row = (Current row) - (pivot column coefficient) X (New pivot row)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

29

Simplex method - Summary (Maximization)


The steps of the simplex method are:
1. Determine a starting basic feasible solution.
2. Select an entering variable using the optimality condition.
Stop if there is no entering variable; the last solution is
optimal. Else, go to step 3.
3. Select a leaving variable using the feasibility condition.
4. Determine the new basic solution by using the
appropriate Gauss-Jordan computations. Go to step 2.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

30

15
Solve the following LP problem:
𝑀𝑎𝑥 𝑧 = 9𝑥 + 7𝑥
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
2𝑥 + 𝑥 ≤ 40
𝑥 + 3𝑥 ≤ 30
𝑥 ,𝑥 ≥ 0

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

31

Simplex method - (Minimization)


• Only Optimality condition is changed as follows:

Optimality condition. The entering variable in a


minimization problem is the nonbasic variable having the
most positive coefficient in the z-row. Ties are broken
arbitrarily. The optimum is reached at the iteration where all
the z-row coefficients of the nonbasic variables are
nonpositive.

The rest of the algorithm remains unchanged.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

32

16
Surplus and Artificial variables (1 of 2)
• A (≥) constraint sets a lower limit on the activities of the LP
model, so it represents a surplus.
• The conversion from (≥) to ( =) is achieved by subtracting a
nonnegative surplus variable from the left-hand side of the
inequality.
• For example
𝑥 + 𝑥 ≥ 800
The constraint can be converted to the following equation

𝑥 + 𝑥 − 𝑆 = 800, 𝑆 ≥ 0

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

33

Surplus and Artificial variables (2 of 2)


• LPs in which all the constraints are with nonnegative right-
hand sides offer a convenient all-slack starting basic
feasible solution.
• Models involving (=) and/or (≥) constraints do not.
• The procedure for starting "ill-behaved" LPs with ( =) and
(≥) constraints is to use artificial variables that play the
role of slacks at the first iteration, and then dispose of them
legitimately at a later iteration.
• This methodology is used in the M-method.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

34

17
M-Method
• The M-method starts with the LP in equation form.
• If equation i does not have a slack (or a variable that can
play the role of a slack), an artificial variable, 𝐴 , is added
to form a starting solution similar to the convenient all-
slack basic solution.
• Artificial variables are not part of the original LP model,
so the are assigned a very high Penalty in the objective
function, thus forcing them to equal zero in the optimum
solution.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

35

Penalty Tule for Artificial Variables


• Given M, a sufficiently large positive value (mathematically,
𝑀 → ∞), the objective coefficient of an artificial variable
represents an appropriate penalty if:

−𝑀, 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛
Artificial variable objective coefficient =
𝑀, 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

36

18
Muddy River Chemical Company

• The Muddy River Chemical Corporation must produce


exactly 1,000 pounds of a special mixture of phosphate
and potassium for a customer.
• Phosphate costs $5 per pound and potassium costs $6 per
pound. No more than 300 pounds of phosphate can be
used, and at least 150 pounds of potassium must be used.
• The problem is to determine the least-cost blend of the
two ingredients.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

37

Solving Minimization Problems


• The Muddy River Chemical Company

Minimize cost = $5X1 + $6X2


subject to X1 + X2 = 1,000 lb
X1 ≤ 300 lb
X2 ≥ 150 lb
X1, X2 ≥ 0

where
X1 = number of pounds of phosphate
X2 = number of pounds of potassium

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

38

19
Graphical Analysis
FIGURE M7.3 Muddy River Chemical Corporation’s Feasible
Region Graph

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

39

Converting the Constraints and Objective


Function
Minimize cost = $5X1 + $6X2
subject to X1 + X2 = 1,000 lb
X1 ≤ 300 lb
X2 ≥ 150 lb
X 1 , X2 ≥ 0

Minimize cost = $5X1 + $6X2 + $0S1 + $0S2 + $MA1 + $MA2 blank


subject to 1X1 + 1X2 + 0S1 + 0S2 + 1A1 + 0A2 = 1,000
blank

blank 1X1 + 0X2 + 1S1 + 0S2 + 0A1 + 0A2 = 300


blank

blank 0X1 + 1X2 + 0S1 − 1S2 + 0A1 + 1A2 = 150

X1, X2, S1, S2, A1, A2 ≥ 0

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

40

20
Assuming M with a value
• From the standpoint of solving the problem on the
computer, M must assume a numeric value.
• M must be sufficiently large relative to the original objective
coefficients so it will act as a penalty that forces the
artificial variables to zero level in the optimal solution.
• For the Muddy River Chemical Company problem with
coefficients of 5 and 6, M=100 appears reasonable

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

41

Tableau
Minimize cost = $5X1 + $6X2 + $0S1 + $0S2 + $MA1 + $MA2 blank
subject to 1X1 + 1X2 + 0S1 + 0S2 + 1A1 + 0A2 = 1,000
blank

blank 1X1 + 0X2 + 1S1 + 0S2 + 0A1 + 0A2 = 300


blank

blank 0X1 + 1X2 + 0S1 − 1S2 + 0A1 + 1A2 = 150

X1, X2, S1, S2, A1, A2 ≥ 0


M=100

Basic x1 x2 s1 s2 A1 A2 RHS
z -5 -6 0 0 -100 -100 0
A1 1 1 0 0 1 0 1000
s1 1 0 1 0 0 0 300
A2 0 1 0 -1 0 1 150

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

42

21
z-row consistent
Basic x1 x2 s1 s2 A1 A2 RHS
z -5 -6 0 0 -100 -100 0
A1 1 1 0 0 1 0 1000
s1 1 0 1 0 0 0 300
A2 0 1 0 -1 0 1 150

𝑥 ,𝑥 ,𝑠 = 0 𝐴 = 1000 𝑠 = 300 𝐴 = 300

Minimize cost = $5X1 + $6X2 + $0S1 + $0S2 + $MA1 + $MA2

𝑧 = 5 0 + 6 0 + 0 300 + 0 0 + 100 1000 + 100 150 = 115,000

z is inconsistent with z-row tableau

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

43

If M =100
Eliminating inconsistency - z-row
• We can eliminate this inconsistency by substituting out A1
and A2 in the z-row using the appropriate constraint
equations
𝑛𝑒𝑤 𝑧 𝑟𝑜𝑤 = 𝑜𝑙𝑑 𝑧 𝑟𝑜𝑤 + (100 × 𝐴 𝑟𝑜𝑤 + 100 × 𝐴 row)

Basic x1 x2 s1 s2 A1 A2 RHS
z -5 -6 0 0 -100 -100 0
Old A1 1 1 0 0 1 0 1000
s1 1 0 1 0 0 0 300
A2 0 1 0 -1 0 1 150
Basic x1 x2 s1 s2 A1 A2 RHS

z 95 194 0 -100 0 0 115000


New A1 1 1 0 0 1 0 1000
s1 1 0 1 0 0 0 300
A2 0 1 0 -1 0 1 150
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

44

22
Optimality
Simplex iterations (minimization) Condition:
Choose
nonbasic
Basic x1 x2 s1 s2 A1 A2 RHS variable
z 95 194 0 -100 0 0 115000 having the
A1 1 1 0 0 1 0 1000 most
s1 1 0 1 0 0 0 300 positive
A2 0 1 0 -1 0 1 150 coefficient

Basic x1 x2 s1 s2 A1 A2 RHS

z 95 194 0 -100 0 0 115000 Ratio

A1 1 1 0 0 1 0 1000 1000/1=1000

s1 1 0 1 0 0 0 300 -

A2 0 1 0 -1 0 1 150 150/1=150

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

45

Gauss-Jordan
row operations
Simplex iterations
Basic x1 x2 s1 s2 A1 A2 RHS
z 95 0 0 94 0 -194 85900 Ratio
A1 1 0 0 1 1 -1 850 850
s1 1 0 1 0 0 0 300 300
x2 0 1 0 -1 0 1 150 -

Basic x1 x2 s1 s2 A1 A2 RHS
z 0 0 -95 94 0 -194 57400 Ratio
A1 0 0 -1 1 1 -1 550 550
x1 1 0 1 0 0 0 300 -
x2 0 1 0 -1 0 1 150 -

Optimal
Basic x1 x2 s1 s2 A1 A2 RHS Solution
z 0 0 -1 0 -94 -100 5700
s2 0 0 -1 1 1 -1 550
𝑧 = 5,700
x1 1 0 1 0 0 0 300 𝑥 = 300
x2 0 1 -1 0 1 0 700
𝑥 = 700
Optimal Tableau

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

46

23
Copyright

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

47

24

You might also like