Module 07 PDF
Module 07 PDF
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
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
3
Converting the Constraints to Equations (2 of
3)
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
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.
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
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
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
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)
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
23
Simplex Tableau
• Check Feasibility (Ratios)
Enter Minimum
ratio = S2
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
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
28
14
Simplex method - Summary (Maximization)
New row = (Current row) - (pivot column coefficient) X (New pivot row)
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
29
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
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
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
−𝑀, 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛
Artificial variable objective coefficient =
𝑀, 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
36
18
Muddy River Chemical Company
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.
37
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
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
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
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
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
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