0% found this document useful (0 votes)
0 views27 pages

Chapter4 Tracked

The document provides an overview of the Simplex Method in linear programming, detailing the steps to formulate problems, convert them into standard and tableau forms, and execute the Simplex algorithm. It includes examples of minimization and maximization problems, illustrating how to set up initial tableaux and perform iterations to find optimal solutions. Key steps in the algorithm, such as determining entering and leaving variables, generating new tableaux, and calculating objective function values, are also outlined.

Uploaded by

kiviyo3592
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views27 pages

Chapter4 Tracked

The document provides an overview of the Simplex Method in linear programming, detailing the steps to formulate problems, convert them into standard and tableau forms, and execute the Simplex algorithm. It includes examples of minimization and maximization problems, illustrating how to set up initial tableaux and perform iterations to find optimal solutions. Key steps in the algorithm, such as determining entering and leaving variables, generating new tableaux, and calculating objective function values, are also outlined.

Uploaded by

kiviyo3592
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Slides Prepared by

JOHN S. LOUCKS
St. Edward’s University

© 2003 ThomsonTM/South-Western Slide 1


4th Week
Linear Programming: The Simplex Method

 An Overview of the Simplex Method


 Standard Form
 Tableau (Canonical) Form
 Setting Up the Initial Simplex Tableau
 Improving the Solution
 Calculating the Next Tableau
 Finding the Optimal Solution

© 2003 ThomsonTM/South-Western Slide 2


Overview of the Simplex Method

 Steps Leading to the Simplex Method

Put In
Formulate Put In Execute
Tableau
Problem Standard Simplex
(Canonical)
as LP Form Method
Form

© 2003 ThomsonTM/South-Western Slide 3


Example: Initial Formulation

 A Minimization Problem

Z = 2x1 - 3x2 - 4x3


s. t. x1 + x2 + x3 < 30
2x1 + x2 + 3x3 > 60
x1 - x2 + 2x3 = 20

x1, x2, x3 > 0

© 2003 ThomsonTM/South-Western Slide 4


Standard Form

 An LP is in standard form when:


•All variables are non-negative
•All constraints are equalities
 Putting an LP formulation into standard form involves:
•Add slack variables to “<“ constraints, convert < into =
•Subtracting surplus variables from “>” constraints,
convert > into =
•Do not change the constraint(s) in equality
Z = 2x1 - 3x2 - 4x3 + 0s1 - 0s2
x1 + x2 + x3 < 30  x 1 + x2 + x3 + s1 = 30

2x1 + x2 + 3x3 > 60  2x1 + x2 + 3x3 - s2 = 60


x1 - x2 + 2x3 = 20  x1 - x2 + 2x3 = 20 (do not change)
© 2003 ThomsonTM/South-Western Slide 5
Example: Standard Form

 Problem in Standard Form

Z = 2x1 - 3x2 - 4x3 + 0s1 - 0s2


s. t. x1 + x2 + x3 + s1 = 30
2x1 + x2 + 3x3 - s2 = 60
x1 - x2 + 2x3 = 20

x1, x2, x3, s1, s2 > 0

© 2003 ThomsonTM/South-Western Slide 6


Tableau (Canonical) Form

 A set of equations is in tableau form if for each


equation:
•Its right hand side (RHS) is non-negative, and there
is a basic variable.
•A basic variable for an equation is a variable whose
coefficient in the equation is +1 and whose
coefficient in all other equations of the problem is 0.)
 To generate an initial tableau form:
•An artificial variable must be added to each
constraint that does not have a basic variable.

© 2003 ThomsonTM/South-Western Slide 7


Example: Tableau (Canonical) Form

 Problem in Tableau Form

(Max) Z = 2x1 - 3x2 - 4x3 + 0s1 - 0s2 - Ma2 - Ma3


s. t. x1 + x2 + x3 + s1 = 30
2x1 + x2 + 3x3 - s2 + a2 = 60
x1 - x2 + 2x3 + a3 = 20

x1, x2, x3, s1, s2, a2, a3 > 0

© 2003 ThomsonTM/South-Western Slide 8


SIMPLEX METHOD

 The simplex tableau is a convenient means for


performing the calculations required by the simplex
method.

 Building Canonical Form, Setting Up Initial (The


first) Simplex Tableau
 Simplex Algorithm (Method)

© 2003 ThomsonTM/South-Western Slide 9


Setting Up Initial (The first) Simplex Tableau

 Step 1: If the problem is a minimization problem,


multiply the objective function by -1.
Min z = - Max z Min z = 2x1 - 3x2  Max z = - 2x1 + 3x2
 Step 2: If the problem formulation contains any
constraints with negative right-hand sides,
multiply each constraint by -1.
2x1 + x2 > - 10  - 2x1 - x2 < 10
 Step 3: Add a slack variable to each < constraint. Set
each slack variable's coefficient in the objective function
equal to zero.
 Step 4: Subtract a surplus variable and add an
artificial variable to each > constraint. Set each surplus
variable's coefficient in the objective function equal to
zero.
© 2003 ThomsonTM/South-Western Slide 10
Setting Up Initial (The first) Simplex Tableau

 Step 5: Add an artificial variable to each = constraint.

 Step 6: Set each artificial variable's coefficient in the


objective function equal to -M, where M is a
very large number (Big M Method).
 Step 7: Each slack and artificial variable becomes one
of the basic variables in the initial basic
feasible solution.

© 2003 ThomsonTM/South-Western Slide 11


Let’s practice to set up Initial (The first) Simplex
Tableau

x1 x2 x3 s2 s1 a2 a3
Basic cB 2 -3 -4 0 0 -M -M

s1 0 1 1 1 0 1 0 0 30
a2 -M 2 1 3 -1 0 1 0 60
a3 -M 1 -1 2 0 0 0 1 20
zj
cj - zj
© 2003 ThomsonTM/South-Western Slide 12
Simplex Algorithm (Method)

 Step 1: Determine Entering Variable


•Identify the variable with the most positive value
in the cj - zj row. (The entering column is called
the pivot column.)
 Step 2: Determine Leaving Variable
•For each positive number in the entering column,
compute the ratio of the right-hand side values
divided by these entering column values.
•If there are no positive values in the entering
column, STOP; the problem is unbounded.
•Otherwise, select the variable with the minimal
ratio. (The leaving row is called the pivot row.)

© 2003 ThomsonTM/South-Western Slide 13


Simplex Algorithm (Method)

 Step 3: Generate Next Tableau


•Divide the pivot row by the pivot element (the
entry at the intersection of the pivot row and pivot
column) to get a new row. We denote this new
row as (row *).
•Divide the pivot column by negative the pivot
element (the entry at the intersection of the pivot
row and pivot column) to get a new column.
• Replace each non-pivot row i with:
[new row i] = [current row i] - [(aij) x (row *)],
where aij is the value in entering column j of row i

© 2003 ThomsonTM/South-Western Slide 14


Simplex Algorithm (Method)

 Step 4: Calculate zj Row for New Tableau


•For each column j, multiply the objective function
coefficients of the basic variables by the
corresponding numbers in column j and sum them.

© 2003 ThomsonTM/South-Western Slide 15


Simplex Algorithm (Method)

 Step 5: Calculate cj - zj Row for New Tableau


•For each column j, subtract the zj row from the cj row.
•If none of the values in the cj - zj row are positive, GO
TO STEP 1.
•If there is an artificial variable in the basis with a
positive value, the problem is infeasible. STOP.
•Otherwise, an optimal solution has been found. The
current values of the basic variables are optimal. The
optimal values of the non-basic variables are all zero.
•If any non-basic variable's cj - zj value is 0, alternate
optimal solutions might exist. STOP.

© 2003 ThomsonTM/South-Western Slide 16


Example: Simplex Method

 Solve the following problem by the simplex method:

Max 12x1 + 18x2 + 10x3

s.t. 2x1 + 3x2 + 4x3 < 50


-x1 + x2 + x3 < 0
-x2 + 1.5x3 < 0

x1, x2, x3 > 0

© 2003 ThomsonTM/South-Western Slide 17


Example: Simplex Method

 Writing the Problem in Tableau Form


The slack variables s1, s2, and s3 are added to the
three constraints to get a tableau (canonical) form.

Max 12x1 + 18x2 + 10x3 + 0s1 + 0s2 + 0s3


s.t. 2x1 + 3x2 + 4x3 + s1 = 50
- x1 + x2 + x3 + s2 = 0
- x2 + 1.5x3 + s3 = 0
x1, x2, x3, s1, s2, s3 > 0

© 2003 ThomsonTM/South-Western Slide 18


Example: Simplex Method

 Initial Simplex Tableau

x1 x2 x3 s1 s2 s3

Basic cB 12 18 10 0 0 0

s1 0 2 3 4 1 0 0 50
s2 0 -1 1 1 0 1 0 0 (* row)
s3 0 0 -1 1.5 0 0 1 0

zj ? ? ?
cj - zj ? ? ?

© 2003 ThomsonTM/South-Western Slide 19


Example: Simplex Method

© 2003 ThomsonTM/South-Western Slide 20


Example: Simplex Method

 Iteration 1 (continued) - New Tableau

x1 s2 x3 s1 x2 s3

Basic cB 12 0 10 0 18 0

s1 0 5 -3 1 1 0 0 50 (* row)
x2 18 -1 1 1 0 1 0 0
s3 0 -1 1 2.5 0 0 1 0

zj -18 18 18
cj - zj 30 -18 -8

© 2003 ThomsonTM/South-Western Slide 21


Example: Simplex Method

© 2003 ThomsonTM/South-Western Slide 22


Example: Simplex Method

 Iteration 2 (continued) – Final Tableau

s1 s2 x3 x1 x2 s3

Basic cB 0 0 10 12 18 0
x1 12 .2 -.6 .2 1 0 0 10
x2 18 .2 .4 1.2 0 1 0 10
s3 0 .2 .4 2.7 0 0 1 10

zj 6 0 24 300
cj - zj -6 0 -14

© 2003 ThomsonTM/South-Western Slide 23


Example 2
Max z = 2x1 + 6x2 + 5x3
s.t. x1 + x2 + x3 < 40
x1 + 2x2 < 20
x1, x2, x3 > 0

Initial (the first) Tableau [1st Stage]

© 2003 ThomsonTM/South-Western Slide 24


Example 2
Initial (the first) Tableau [1st Stage]

Iteration 1 [ 2nd Stage ]

© 2003 ThomsonTM/South-Western Slide 25


Example 2
Iteration 1 [ 2nd Stage ]

Iteration 2 [ 3rd Stage ]

© 2003 ThomsonTM/South-Western Slide 26


End of 4th Week

© 2003 ThomsonTM/South-Western Slide 27

You might also like