5 Simplex - Introduction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

Solving Linear

Programming
Problems:
The Simplex Method
Wyndor Glass Co. Problem
•Constraint boundary

•corner-point solutions

•cornerpoint feasible solutions(CPF


solutions)

•Certain pairs of the CPF solutions


share a constraint boundary and
other pairs do not

•two edges emanate from each CPF


solution

• each CPF solution has two


adjacent CPF solution
Wyndor Glass Co. Problem

Optimality test: If a CPF solution


has no adjacent CPF solutions that
are better (as measured by Z), then
it must be an optimal solution.
Introducing Simplex using Geometric Viewpoint

Steps:
• Initialization

• Optimality test
• Iteration 1
• Iteration 2
• ……..
6 Key Solution Concepts of Simplex
1. Focuses solely on CPF solutions. For any problem with at least one
optimal solution, finding one requires only finding a best CPF
solution
2. The simplex method is an iterative algorithm (a systematic solution
procedure that keeps repeating a fixed series of steps, called an
iteration, until a desired result has been obtained) with the following
structure
6 Key Solution Concepts of Simplex
3. Whenever possible, the initialization of the simplex method chooses
the origin (all decision variables equal to zero) to be the initial CPF
solution. When there are too many decision variables to find an
initial CPF solution graphically, this choice eliminates the need to
use algebraic procedures to find and solve for an initial CPF solution.
4. Given a CPF solution, it is much quicker computationally to gather
information about its adjacent CPF solutions than about other CPF
solutions. Therefore, each time the simplex method performs an
iteration to move from the current CPF solution to a better one, it
always chooses a CPF solution that is adjacent to the current one. No
other CPF solutions are considered. Consequently, the entire path
followed to eventually reach an optimal solution is along the edges of
the feasible region.
6 Key Solution Concepts of Simplex
5. After the current CPF solution is identified, the simplex method examines each
of the edges of the feasible region that emanate from this CPF solution. Each of
these edges leads to an adjacent CPF solution at the other end, but the simplex
method does not even take the time to solve for the adjacent CPF solution.
Instead, it simply identifies the rate of improvement in Z that would be
obtained by moving along the edge. Among the edges with a positive rate of
improvement in Z, it then chooses to move along the one with the largest rate of
improvement in Z. The iteration is completed by first solving for the adjacent
CPF solution at the other end of this one edge and then relabeling this
adjacent.
6. Solution concept 5 describes how the simplex method examines each of the
edges of the feasible region that emanate from the current CPF solution. This
examination of an edge leads to quickly identifying the rate of improvement in
Z that would be obtained by moving along the edge toward the adjacent CPF
solution at the other end. A positive rate of improvement in Z implies that the
adjacent CPF solution is better than the current CPF solution, whereas a
negative rate of improvement in Z implies that the adjacent CPF solution is
worse. Therefore, the optimality test consists simply of checking whether any of
the edges give a positive rate of improvement in Z. If none do, then the current
CPF solution is optimal.
Setting Up the Simplex Method
▪ Simplex follows algebraic procedures (simplex- an algorithm)
▪ The algebraic procedure is based on solving systems of equations
▪ Equations? – converting those functional inequality constraints into
equivalent equality constraints
▪ Oneadditional trick to follow: Adding slack variables during these
conversations
▪ Thisleads to: original form of LP model to equivalent augmented form of
the model
Setting Up the Simplex Method

▪ In augmented form: decision (original) variables and slack variables


▪ The augmented solution: decision (original) + slack variable values
▪ Task?- what would be the augmented solution, if (2,3) is the current original
solution of the original form of the model.
Setting Up the Simplex Method
▪ Find all the augmented solutions for those CPFs
CPFs Augmented CPFs

(0, 0) (0, 0, 4, 12, 18)

(0, 6) (0, 6, 4, 0, 6)
Basic Feasible
(4, 0) (4, 0, 0, 12, 6)
(BF) solutions
(2, 6) (2, 6, 2, 0, 0)

(4, 3) (4, 3, 0, 6, 0)

CPs Augmented CPs


(0, 9) (0, 9, 4, -6, 0) Basic solutions
(4, 6) (4, 6, 0, 0, -6)
(6, 0) (6, 0, -2, 12, 0)
Setting Up the Simplex Method
• Basic Feasible • Basic solutions
(BF) solutions
important parts for the standard
vocabulary in linear programming

This augmented problem has:


• 3 equations
• 5 variables (2 decision, 3 slack)
• Degree of freedom= 5-3 = 2
• 2 variables’ value need to set prior in an
arbitrary way
• Simplex uses zero as these arbitrary values
• These 2 are non-basic variables
Setting Up the Simplex Method
This augmented problem has:
• 3 equations
• 5 variables (2 decision, 3 slack)
• Degree of freedom= 5-3 = 2
• 2 variables’ value need to set prior in an
arbitrary way-
• Simplex uses zero as these arbitrary values
• These 2 are non-basic variables

• Rest 3 are basic variables


• Task? – no. of basic and non-basic are 3 and 2 respectively- why
3 and 2?
• n(functional constraints)= n(basic variables)- sets of them are
called basis
• n(Total variables [decision+slack]) – n(basic)=n(non-basic)
Setting Up the Simplex Method
Properties of Basic Solution (summarized)
1. Each variable is designated as either a non-basic variable or a basic
variable.
2. The number of basic variables equals the number of functional
constraints (now equations). Therefore, the number of non-basic variables
equals the total number of variables minus the number of functional
constraints.
3. The non-basic variables are set equal to zero.
4. The values of the basic variables are obtained as the simultaneous
solution of the system of equations (functional constraints in augmented
form). (The set of basic variables is often referred to as the basis.)
5. If the basic variables satisfy the nonnegativity constraints, the basic
solution is a BF solution.
Setting Up the Simplex Method
Demonstration with
algebra
x1 x2 x3 x4 x5
1. 0 0
2. 0 0
3. 0 0
4. 0 0
5. 0 0
6. 0 0
7. 0 0
8. 0 0
9. 0 0
10. 0 0
Setting Up the Simplex Method
Relating with graph (Adjacent CPFs to Adjacent
BF)

CPFs Augmented CPFs CPF


Adjacent
(0, 0) (0, 0, 4, 12, 18) CPF

(0, 6) (0, 6, 4, 0, 6)

(2, 6) (2, 6, 2, 0, 0)

(4, 3) (4, 3, 0, 6, 0)

(4, 0) (4, 0, 0, 12, 6)

Two BF solutions are adjacent if all but one of their


non-basic variables are the same. This implies that
all but one of their basic variables also are the same,
although perhaps with different numerical values.
Setting Up the Simplex Method
Relating with graph (Adjacent CPFs to Adjacent
BF)

CPFs Augmented CPFs CPF


Adjacent
(0, 0) (0, 0, 4, 12, 18) CPF

(0, 6) (0, 6, 4, 0, 6)

(2, 6) (2, 6, 2, 0, 0)

(4, 3) (4, 3, 0, 6, 0)

(4, 0) (4, 0, 0, 12, 6)

Two BF solutions are adjacent if all but one of their


non-basic variables are the same. This implies that
all but one of their basic variables also are the same,
although perhaps with different numerical values.
Setting Up the Simplex Method
Adding another thing in Augmentation
The Algebra of the Simplex
Method
Initialization
• Choose x1, x2 as the non basic variables (concept
3)
• So (x3, x4, x5) are now basic variables

Initial BF solution is (0, 0, 4, 12, 18)

• In this picture- if we set x1’s and x2’s with zero values


each equation (0 to 3) has only 1 basic variable in the left
side (Z, x3, x4, x5)
• This is called proper form from Gaussian elimination
• Theme of Gaussian Elimination is used to
• solve the basic variables just by observation
The Algebra of the Simplex
Method
Optimality Test

initial BF solution is (0, 0, 4, 12, 18)

• Now have to check whether the current non-basics (x1, x2)


can be increased satisfying the problem or constraints?
• Rates of improvement of x1 and x2 both are positive and 3
and 5 respectively.
• Rate of improvements if not negative or zero🡺 current BF
is not optimal (Concept 6)
The Algebra of the Simplex
Method
Determining the Direction of Movement (Step 1 of an
Iteration)
finding a new basic variable (entering)

Based on solution concepts 4 and 5

x2 the entering basic variable for iteration 1


The Algebra of the Simplex
Method
Determining Where to Stop (Step 2 of an Iteration)
finding who would be new non- basic variable
(leaving basic variable)

x1=0 (already non-basic variable) & x2 the entering basic


variable for iteration 1
The Algebra of the Simplex
Method
Determining Where to Stop (Step 2 of an Iteration)
finding who would be new non- basic variable
(leaving basic variable)

Imposing non-negativity constraint on those basic


variables

• x2 can be increased up to 6: minimum ratio test


• Making x2, 6 which variable’s becoming zero?
• Thus we get leaving basic variable: x4
The Algebra of the Simplex
Method
Determining Where to Stop (Step 2 of an Iteration)

Summary
• At any iteration of the simplex method, step 2 uses the
minimum ratio test to determine
• which basic variable drops to zero first as the entering
basic variable is increased.
• Decreasing this basic variable to zero will convert it to
a nonbasic variable for the next BF solution.
• Therefore, this variable is called the leaving basic
variable for the current iteration (because it is leaving
the basis)
The Algebra of the Simplex
Method
Solving for the New BF Solution (Step 3 of an Iteration)
last touch of an iteration

• The purpose of step 3:


to convert the system of equations to a more convenient
form (proper form from Gaussian elimination) for
conducting….
• the optimality test and (if needed)
• the next iteration with this new BF solution
• Proper form from Gaussian elimination also will identify
the values of x3 and x5 for the new BF solution
The Algebra of the Simplex
Method
Solving for the New BF Solution (Step 3 of an Iteration)
last touch of an iteration
Proper form from Gaussian elimination
Revisiting Initial Augmented Form at this
iteration

0 0 0
0 0 0
0 0 0
0 0 0
Entering Leaving
Basic Var Basic Var

entering basic variable must capture the structure of the


leaving basic variable
The Algebra of the Simplex
Method
Solving for the New BF Solution (Step 3 of an Iteration)
last touch of an iteration
Proper form from Gaussian elimination
Revisiting Initial Augmented Form at this
iteration

0 0 0
0 0 0
0 0 0
0 0 0
Entering Leaving
Basic Var Basic Var

entering basic variable must capture the structure of the


leaving basic variable
The Algebra of the Simplex
Method
Solving for the New BF Solution (Step 3 of an Iteration)
last touch of an iteration
Proper form from Gaussian elimination

Set of basic variables? Set of nonbasic variables


{x2, x3, x5} {x1, x4}

Augmented BF solution ? Z value?


{0, 6, 4, 0, 6} 30
The Algebra of the Simplex
Method
Optimality Test for the New BF Solution( Last Step of an
Iteration)

End of Iteration 1

Entering basic variable? 🡺 x1

Leaving basic variable? 🡺 ?


The Algebra of the Simplex
Method
Iteration 1: Graphical Vs Simplex (Algebra)
The Algebra of the Simplex
Method
Iteration 2:

Revisiting Final Augmented Form at this 2nd iteration


The Algebra of the Simplex
Method
Iteration 2:

Revisiting optimality test from 1st iteration

End of Iteration 1

Entering basic variable? 🡺 x1

Leaving basic variable? 🡺 ?


The Algebra of the Simplex
Method
Entering basic variable? 🡺 x1
Iteration 2: Leaving basic variable? 🡺 x5
Determining Leaving Basic Variable
The Algebra of the Simplex
Method
Entering basic variable? 🡺 x1
Iteration 2: Leaving basic variable? 🡺 x5
Converting to Proper form from Gaussian Elimination

Entering Leaving
Basic Var Basic Var
The Algebra of the Simplex
Method
Optimality Test for the New BF Solution( Last Step of an
Iteration)

End of Iteration 2

Optimality test satisfied 🡺 Current BF is the optimal


solution

Optimal solution (2, 6, 2, 0, 0)


THE SIMPLEX METHOD IN TABULAR FORM
Tabular form from Algebraic Form
THE SIMPLEX METHOD IN TABULAR FORM
Properties of Tabular form

•The progression logic is identical to that for the algebraic form

• Simultaneously shows the current equation systems and


system after another iteration
• no longer bothering to bring variables to the right-hand side
of an equation
THE SIMPLEX METHOD IN TABULAR FORM
Optimality test and entering basic variable (pivot column)- Iteration 1
THE SIMPLEX METHOD IN TABULAR FORM
Leaving basic variable identification( minimum ratio test- pivot row)- Iteration 1
THE SIMPLEX METHOD IN TABULAR FORM
Proper form Conversion using Gaussian Elimination- Iteration 1
THE SIMPLEX METHOD IN TABULAR FORM
Proper form Conversion using Gaussian Elimination
THE SIMPLEX METHOD IN TABULAR FORM
Optimality Test- End of Iteration 1
THE SIMPLEX METHOD IN TABULAR FORM
Iteration 2- Pivot column 🡺 pivot row

Minimum ratio

=4/1=4
=--
=6/3=2
THE SIMPLEX METHOD IN TABULAR FORM
Iteration 0, 1, 2 in one frame

You might also like