0% found this document useful (0 votes)
48 views40 pages

Chapter 3 - Simplex Method

The document summarizes key aspects of the simplex method for solving linear programs from Chapter 3 of the textbook "Operations Research: An Introduction". It introduces the simplex method as an algebraic approach for determining the optimal solution when there are many variables and constraints. It describes how to convert inequalities to equations using slack variables and outlines the steps to set up the initial simplex tableau, including choosing basic variables. The simplex method works by iteratively calculating new basic solutions until an optimal solution is found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views40 pages

Chapter 3 - Simplex Method

The document summarizes key aspects of the simplex method for solving linear programs from Chapter 3 of the textbook "Operations Research: An Introduction". It introduces the simplex method as an algebraic approach for determining the optimal solution when there are many variables and constraints. It describes how to convert inequalities to equations using slack variables and outlines the steps to set up the initial simplex tableau, including choosing basic variables. The simplex method works by iteratively calculating new basic solutions until an optimal solution is found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Operations Research An Introduction

Tenth Edition

Chapter 3
The Simplex Method

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Today’s Agenda

The Simplex Method: Introduction


LP Model in Equation Form
Slack Variables
Transition from Graphical to Algebraic Solution
Simplex Algorithm
Simplex Iteration: Steps
Homework
Understanding of how and why the algorithm works

Simplex Method
The Simplex Method
•It is an approach for determining the optimal value of a
linear program by hand.

•The graphical method is useful only for problems


involving two decision variables and relatively few
problem constraints.

•What happens when we need more decision variables


and more problem constraints?

•We use an algebraic method called the simplex


method, which was developed by George B. DANTZIG
(1914-2005) in 1947 while on assignment with the U.S.
Department of the air force.
Standard Maximization Problems in
Standard Form
Theprogramming
A linear developmentproblem
of the simplex
is said method
to be a computations is
standard maximization
facilitated
problem by imposing
in standard form iftwo requirementsmodel
its mathematical on the LP the
is of model:
following
form:
1. All the constraints arethe
Maximize equations
objectivewith nonnegative right-
function
hand side.
max 
2. All Zthe P  c1x1  care
variables 2 x2  ...  cn xn
nonnegative.

Subject to problem constraints of the form


a1 x1  a2 x2  ...  an xn  b ,b  0
x1 , x2 ,..., xn  0
With non-negative constraints
Converting inequalities into equations
with nonnegative right-hand side.

• To convert a inequality to an
equation, a nonnegative slack
LP Model in variable is added to the left-hand side
Equation of the constraint.
Form
• Ex: M1-constraint of the Reddy Mikks
model is converted into an equation
as:
6x1 + 4x2 + s1 = 24, s1 0
“A mathematical representation
of surplus resources.” In real life
problems, it’s unlikely that all
resources will be used
completely, so there usually are
Slack unused resources.

Variables
Slack variables represent the
unused resources between the
left-hand side and right-hand
side of each inequality.
LP: THE SIMPLEX METHOD

max Z = 5x1 + 4x2 max Z = 5x1 + 4x2


Subject to: Subject to:
𝟒 𝒙 𝟏+𝟔 𝒙 𝟐≤𝟐𝟒 𝟒 𝒙 𝟏+𝟔 𝒙 𝟐+𝒔 𝟏=𝟐𝟒
𝒙 𝟏+𝟐𝒙 𝟐≤𝟔 𝟒 𝒙 𝟏+𝟐 𝒙 𝟐+𝒔 𝟐=𝟔
− 𝒙 𝟏+𝒙 𝟐 ≤ 𝟏 -
𝒙 𝟐≤𝟐
𝒙 𝟏, 𝒙 𝟐≥𝟎 𝒙 𝟐+ 𝒔𝟒 =𝟐
𝒙𝟏, 𝒙𝟐, 𝒔𝟏 , 𝒔𝟐 ,𝒔 𝟑 ≥𝟎
Basic Solutions
• When we include the slack variables, we
now have 6 variables and 4 constraints
(equations)!
• When the number of n variables is greater
than the number of equations m, it is an
LP: THE indeterminate system, so we will not find
the final solution of the values (infinite
SIMPLE number of solutions).
• Thus, we must equate the number of
X variables and equations. For this, we simply
set the values of (n-m) variables to zero.
METHO • In our example: (6-4) = 2 variables that will
have values equal to zero so that we can
D find the other variables.
• The variables that will be calculated are
called a basic solution, because they make
up the base of the solution.
• Variables equal to zero are called nonbasic
variables.
Transition from Graphical to Algebraic Solution

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Iterative Process of the Simplex Method

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex Method: How to Calculate

• Simplex begins at the origin [(x1,x2) = (0,0)] and seeks a better


solution with each iteration.
• It goes through the extreme points of a feasible region.
• Each simplex iteration is represented by a table called a tableau.
• Steps:
• Assembly of the initial tableau (origin);
• Improved solution calculations, and tableau creation;
• Check if solution found is optimal, if not, next step;
• Repeat calculations until you find the tableau with optimal
solution.
Simplex Iteration: Steps
1. Convert each inequality in the set of constraints to an equation by
adding slack variables.

Maximize z = 5x1 + 4x2 + 0s1 + 0s2 + 0s3 +0s4


Subject to

6x1 + 4x2 + s1 = 24 (raw material M1)


x1 + 2x2 + s2 = 6 (raw material M2)
– x1 + x 2 s3 = 1 (market limit)
x2 s4 = 2 (demand limit)
x1, x2 , s1 0

Next, write the objective equation as: z - 5x1 - 4x2


Simplex Iteration: Steps
2. Create the initial simplex tableau.

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
Decision
2. Create the initial simplex tableau. variables

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
2. Create the initial simplex tableau.
basic variables

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
Objective function
2. Create the initial simplex tableau. coefficients

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
Constraints variables
2. Create the initial simplex tableau. coefficients

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
Right-hand sides of
the model’s
2. Create the initial simplex tableau. equations

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Iteration: Steps
Nonbasic variables
2. Create the initial simplex tableau.

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24
s1-row
s2 0 1 2 0 1 0 0 6
s2-row
s3 0 -1 1 0 0 1 0 1
s3-row
s4 0 0 1 0 0 0 1 2
s4-row
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex iteration: initial simplex tableau
 Initial tableau: solution starts at the origin (0, 0)
 n – m = 6 – 4 = 2 (setting n-m variables equal to zero and solve the
remaining variables)
 At the origin we have a basic feasible solution:
s1 = 24; s2 = 6; s3 = 1; s4 = 2
 x and y are non basic variables at the origin

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0
s1 0 6 4 1 0 0 0 24
s2 0 1 2 0 1 0 0 6
s3 0 -1 1 0 0 1 0 1

s4 0 0 1 0 0 0 1 2
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex iteration: initial tableau

 Origin point (0,0)


 Is the starting solution optimum?
 The objective function z = 5x1 + 4x2 shows that the solution can be
improved by increasing the value of nonbasic x1 or x2 above zero.

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0

s1 0 6 4 1 0 0 0 24

s2 0 1 2 0 1 0 0 6

s3 0 -1 1 0 0 1 0 1

s4 0 0 1 0 0 0 1 2
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex 1st iteration: entering variable

 x1 is to be selected because is the nonbasic variable with the most


negative coefficient in the the objective equation (simplex
optimality condition).
 If x1 is the entering variable, one of the current basic variables
must leave (it becomes a nonbasic at zero level (recall the number
of nonbasic variables must always be n-m).
Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0

s1 0 6 4 1 0 0 0 24

s2 0 1 2 0 1 0 0 6

s3 0 -1 1 0 0 1 0 1

s4 0 0 1 0 0 0 1 2
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex 1st iteration: leaving variable

 The mechanics for determining the leaving variable calls for


computing the ratios of the right-hand side of the equations
(solution column) to the corresponding positive constraints under
the entering variable, x1.

Basic Entering x1 Solution Ratio (or


intercept)
s1 6 24 4
s2 1 6 6
s3 -1 1 -1
s4 0 2 infinite
Simplex 1st iteration: leaving variable

 The mechanics for determining the leaving variable calls for


computing the ratios of the right-hand side of the equations
(solution column) to the corresponding positive constraints under
the entering variable, x1. minimum
Basic( Entering x1 Solution Ratio (or
intercept)
s1 6 24 4
s2 1 6 6
s3 -1 1 -1
s4 0 2 infinite

 Conclusion: x1 enters and s1 leaves; feasibility


Simplex 1st iteration:

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0

s1 0 6 4 1 0 0 0 24

s2 0 1 2 0 1 0 0 6

s3 0 -1 1 0 0 1 0 1

s4 0 0 1 0 0 0 1 2
Simplex Algorithm

Initial Solution

Optimum yes
End
Solution?
no

Entering Variable

Leaving Variable

Pivot
Simplex 1st iteration: pivot
 The swapping process is based on the Gauss-Jordan row operations. Entering
variable column = pivot column; leaving variable row = pivot row with their
intersection being the pivot element.
pivot row

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 -5 -4 0 0 0 0 0

s1 0 6 4 1 0 0 0 24

s2 0 1 2 0 1 0 0 6

s3 0 -1 1 0 0 1 0 1

s4 0 0 1 0 0 0 1 2

Pivot column
Simplex 1st iteration: pivot

 Pivot row:
a) Replace the leaving variable in the basic column with the
entering variable
b) New pivot row = current pivot row ➗ pivot element

 All other rows, including z

New row = (current row) – (pivot column coefficient) (new pivot


row)
Simplex 2nd iteration: pivot
 The operations have produced the following tableau (verify!):

Basic z x1 x2 s1 s2 s3 s4 Solution

z 1 0 0 3/4 1/2 0 0 21

x1 0 1 0 1/4 -1/2 0 0 3

x2 0 0 1 -1/8 3/4 0 0 3/2

s3 0 0 0 3/8 -5/4 1 0 5/2

s4 0 0 0 1/8 -3/4 0 1 1/2

 Based on the optimality condition, none of the z-row


coefficients are negative. Therefore, the last tableau is optimal.
Reading the simplex optimal tableau

Decision Variable Optimum Value Recommendations

x1 3 Produce 3 tons of
exterior paint daily

x2 3/2 Produce 1.5 tons of


interior point daily

z 21 Daily profit is $21,000


Reading the simplex optimal tableau: status of the
resources

Resource Slack value Status

Raw material, M1 s1 = 0 Scarce

Raw material, M2 s2 = 0 Scarce

Market limit s3 = 5/2 Abundant

Demand limit s4 = 1/2 Abundant


Summary of the Simplex Method

 Optimality condition - The entering variable in a maximization


(minimization) problem is the nonbasic variable with the most
negative (positive) coefficient in the z-row.
 Feasibility condition – For both the maximization and
minimization problems, the leaving variable is the basic variable
associated with the smallest nonnegative ratio with strictly
positive denominator.
 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 efficient) (new pivot row)
Homework: Time to Practice!!!
1. Consider the following linear programming model.
Maximize Z = 3x1 + 2 x2,
subject to
x1 ≤ 4
x1 + 3x2 ≤ 15
2x1 + x2 ≤ 10
and
x1 ≥ 0, x2 ≥ 0

Work through the simplex method (in algebraic form) to


solve this model.
Homework: Time to Practice!!!

2. The Cannon Hill furniture Company produces tables and chairs.


Each table takes four hours of labor from the carpentry
department and two hours of labor from the finishing department.
Each chair requires three hours of carpentry and one hour of
finishing. During the current week, 240 hours of carpentry time
are available and 100 hours of finishing time. Each table produced
gives a profit of $70 and each chair a profit of $50. How many
chairs and tables should be made?

You might also like