SlideShare une entreprise Scribd logo
1  sur  56
The Simplex Method
Susana Barreiro
17 March 2021
The Simplex Method
• The Simplex Method
• The Simplex Method - formulation (standard form)
• The Simplex Method - procedure
• The Simplex Method - particular cases
o Tie for the Entering BV
o Tie for the Leaving BV - degenerate
o No leaving BV – Unbounded Z
o Multiple optimal solutions
• The Simplex Method - other cases
o Minimization of the objective function
o Negative Right Hand Sides
o Eliminating negative variables
o Functional constraints in ≥ and = form
o Eliminating unconstrained variables
• The Simplex Method – Exercises
Simplex Method
• The graphical approach can be used for two-variable LP problems
• Unfortunately, most real-life LPs problems require a method to find
optimal solutions capable of dealing with several variables: the
simplex algorithm
In the classes we will focus on the manual application of the simplex algorithm (using
EXCEL), although computer packages to apply the simplex algorithm have been
developed (LINDO and LINGO)
Simplex Method
Formulation
Simplex Method - Formulation
In LP problem, the decision maker
usually wants to:
maximize (usually revenue or profit)
mminimize (usually costs)
the objective function (Z) is
expressed by a set of decision
variables
Certain limitations are often
imposed to these decision
variables (expressed in the form
of ≤, = or ≥).
These restrictions are called
constraints
Max: Z = 90 x1 + 120 x2
Subject to:
x1 ≤ 40
x2 ≤ 50
2x1 + 3x2 ≤ 180
and x1 ≥ 0; x2 ≥ 0
(ha of pine)
(ha of eucalypt)
(days of work)
(€/yr)
Poets’ Problem
Simplex Method - Formulation
• 1) Objective function is maximized
• 2) Constraints in the form of ≤
inequalities
• 3) All values on the right handside are ≥
• 4) All variables are nonnegative (≥)
The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric
concepts that requires LP problems to be presented in the standard form:
Max: Z = 90 x1 + 120 x2
Subject to:
x1 ≤ 40
x2 ≤ 50
2x1 + 3x2 ≤ 180
and x1 ≥ 0; x2 ≥ 0
(ha of pine)
(ha of eucalypt)
(days of work)
(€/yr)
Simplex Method - Formulation
The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric
concepts that must be translated into algebraic language to allow solving systems of equations.
1st - transform all inequalities into equalities by introducing one additional variable to
each constraint (the slack variables: S1, S2, S3).
Max: Z = 90 x1 + 120 x2
Subject to:
x1 + S1 = 40
x2 + S2 = 50
2x1 + 3x2 + S3 = 180
and x1 x2 S1 S2 S3 ≥ 0
Max: Z = 90 x1 + 120 x2
Subject to:
x1 + S1 ≤ 40
x2 + S2 ≤ 50
2x1 + 3x2 + S3 ≤ 180
and x1 x2 S1 S2 S3 ≥ 0
Original form: Standard or augmented form:
Simplex Method - Formulation
The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric
concepts that must be translated into algebraic language to allow solving systems of equations.
1st - transform all inequalities into equalities by introducing one additional variable to
each constraint (the slack variables: S1, S2, S3).
2nd - transform the objective function into an additional constraint
Max: Z = 90 x1 + 120 x2
Subject to:
x1 + S1 = 40
x2 + S2 = 50
2x1 + 3x2 + S3 = 180
and x1 , x2 , S1 , S2 , S3 ≥ 0
Z - 90 x1 - 120 x2 = 0
x1 + S1 = 40
x2 + S2 = 50
2x1 + 3x2 + S3 = 180
Simplex Method - Formulation
The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric
concepts that must be translated into algebraic language to allow solving systems of equations.
1st - transform all inequalities into equalities by introducing one additional variable to
each constraint (the slack variables: S1, S2, S3).
2nd - transform the objective function into an additional constraint
3rd - build the Simplex tabular form where only the essential information is recorded
Z - 90 x1 - 120 x2 = 0
x1 + S1 = 40
x2 + S2 = 50
2x1 + 3x2 + S3 = 180
Simplex Method - Formulation
The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric
concepts that must be translated into algebraic language to allow solving systems of equations.
1st - transform all inequalities into equalities by introducing one additional variable to
each constraint (the slack variables: S1, S2, S3).
2nd - transform the objective function into an additional constraint
3rd - build the Simplex tabular form where only the essential information is recorded
Basic
variables
Non-basic
variables
initialize the procedure setting x1 = x2 = 0
Each basic feasible solution has basic or
non-basic variables
- non-basic variables are set to ZERO
- basic variables are directly obtained from
the table
(X1, X2, S1, S2, S3 ) =( 0, 0, 40, 50, 180)
Simplex Method - Graphical analysis
• The Simplex algorithm is a search procedure that:
- shifts through the set of basic feasible solutions, one at a time, until the
optimal basic feasible solution (whenever it exists) is identified.
- the method is an efficient implementation the Corner Points Procedure.
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
Corner point feasible solutions –
vertices of the feasible region
Optimal solution(s) – vertice(s) of
the feasible region that maximize Z,
ie solution that gives the best
favorable value to the objective
function
Simplex Method - Graphical analysis
• The Simplex algorithm is a search procedure that:
- shifts through the set of basic feasible solutions, one at a time, until the
optimal basic feasible solution (whenever it exists) is identified.
- the method is an efficient implementation the Corner Points Procedure.
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
Replacing X1 and X2 by the values of A, B, C,
D and E in the objective function:
ZA= 0
ZB= 6000
ZC= 7350
ZD= 7600
ZE = 3600
Z = 90 x1 + 120 x2
Simplex Method - Graphical analysis
• The Simplex algorithm is a search procedure that:
- shifts through the set of basic feasible solutions, one at a time, until the
optimal basic feasible solution (whenever it exists) is identified.
- the method is an efficient implementation the Corner Points Procedure.
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
Feasible solutions – within or on the
border of the feasible region ie
solutions for which the constraints
are satisfied
Infeasible solution – outside the
feasible region, ie solution for which
at least one constraint is violated
Simplex Method - Formulation
Bring the LP problem to the standard form -> obtain a BFS ie set A= (x1, x2) = (0, 0)
Find another feasible solution
Find in which direction to move towards the algebraic equivalent of
an extreme point ie a Basic Feasible Solution with a single different
basic variable
Swap the non-basic variable with one of the basic variables
Apply Gaussian elimination to transform the new basic variable to
(0,1) while solving for Z
No
Optimality check
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
A = (X1, X2, S1, S2, S3 )
= ( 0, 0, 40, 50, 180)
B = (X1, X2, S1, S2, S3 )
= ( 0, 50, 40, 0, 30)
C = (X1, X2, S1, S2, S3 )
= (15, 50, 0, 25, 0 )
A B C
basic S1, S2, S3 S1, X2, S3 X1, X2, S2
non-basic X1, X2 X1, S2 S1, S3
A is adjacent to B but not to C
B is adjacent to both A and C
Simplex Method
Procedure
Simplex Method - Procedure
Bring the LP problem to the standard form -> obtain a BFS ie set (x1, x2) = (0, 0)
Find another feasible solution
Entering variable: Choose the entering variable (in a max problem) to be
the NBV with the most negative coefficient in Row 0. Ties may be broken
in an arbitrary fashion.
Leaving BV: apply minimum ratio test - identify the row with the smallest
ratio RHS /aij (the most restrictive Row); the BV for this row is the leaving
BV (it becomes nonbasic).
Apply Gauss-Jordan elimination procedure to solve the system of linear
equations.
No
Optimality check:
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.
Optimal feasible solution found – STOP SIMPLEX
Yes
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 -120 0 0 0 0
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 3 0 0 1 180
Row
basic var.
coefficients of:
right side
-120 -> 0
3 -> 0
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Simplex Method - Procedure
R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50)
1 -90 0 0 120 0 6000
R1 0 1 0 1 0 0 40
R2 0 0 1 0 1 0 50
R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50)
0 2 0 0 -3 1 30
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30
Row
basic var.
coefficients of:
right side
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30
Row
basic var.
coefficients of:
right side
Z = 6000
S1 = 40
X2 = 50
S3 = 30
X1 = 0
S2 = 0
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30)
X1 = 0  Plant 0 ha of pine
X2 = 50  Plant 50 ha of eucalypt
S1 = 40  40 ha of area available for pine plant.
S2 = 0  no ha of area available for eucalypt plant.
S3 = 30  30 working hours still available
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30
Row
basic var.
coefficients of:
right side
Z = 6000
S1 = 40
X2 = 50
S3 = 30
X1 = 0
S2 = 0
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30)
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180)
The basic variables in these solutions
differ in one single variable (S1 and S3
are maintained as basic variables)
These are adjacent solutions
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30
Row
basic var.
coefficients of:
right side
Z = 6000
S1 = 40
X2 = 50
S3 = 30
X1 = 0
S2 = 0
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30)
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180)
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40 40/1= 40
R2 x2 0 0 1 0 1 0 50 -
R3 S3 0 2 0 0 -3 1 30 30/2= 15
ratio
Row
basic var.
coefficients of:
right side
Simplex Method - Procedure
X1 will become basic
S3 will become non-basic variable
(X1 column will have to take the
shape of S3: (0, 0, 0, 1)
Optimality check:
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40 40/1= 40
R2 x2 0 0 1 0 1 0 50 -
R3 S3 0 2 0 0 -3 1 30 -30/-2= 15
ratio
Row
basic var.
coefficients of:
right side
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30 -3
r
Row
basic var.
coefficients of:
right side
R3 R3*(1/2) (0*(1/2)) (2*(1/2)) (0*(1/2)) (0*(1/2)) (-3*(1/2)) (1*(1/2)) (30*(1/2))
0 1 0 0 -1.5 0.5 15
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30 -3
r
Row
basic var.
coefficients of:
right side
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 x1 0 1 0 0 -1.5 0.5 15
Row
basic var.
coefficients of:
right side
-90 -> 0
1 -> 0
R0 R0-(-90)*R3 (1+90*0) (-90+90*1) (0+90*0) (0+90*0) (120+90*-1.5) (0+90*0.5) (6000+90*15)
1 0 0 0 -15 45 7350
R1 R1-(1)*R3 (0-1*0) (1-1*1) (0-1*0) (1-1*0) (0-1*-1.5) (0-1*0.5) (40-1*40)
0 0 0 1 1.5 -0.5 25
Simplex Method - Procedure
Z x1 x2 S1 S2 S3
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40
R2 x2 0 0 1 0 1 0 50
R3 S3 0 2 0 0 -3 1 30 -3
r
Row
basic var.
coefficients of:
right side
Z x1 x2 S1 S2 S3
R0 Z 1 0 0 0 -15 45 7350
R1 S1 0 0 0 1 1.5 -0.5 25
R2 x2 0 0 1 0 1 0 50
R3 x1 0 1 0 0 -1.5 0.5 15
Row
basic var.
coefficients of:
right side
Z = 7350
S1 = 25
X2 = 50
x1 = 15
S2 = 0
S3 = 0
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B)
X1 = 15  Planted 15 ha of pine
X2 = 50  Planted 50 ha of eucalypt
S1 = 25  25 ha of area available for pine plant.
S2 = 0  no ha of area available for eucalypt plant.
S3 = 0  no working hours available
(x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 0) z=7350 (C)
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A)
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
Simplex Method - Procedure
Optimality check:
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.
Z x1 x2 S1 S2 S3
R0 Z 1 0 0 0 -15 45 7350
R1 S1 0 0 0 1 1.5 -0.5 25 25/1.5= 17
R2 x2 0 0 1 0 1 0 50 -
R3 x1 0 1 0 0 -1.5 0.5 15 15/-1.5= -10
Row
basic var.
coefficients of:
right side ratio
Entering variable: the most negative coefficient in Row 0
Leaving BV: the smallest positive ratio RHS /aij
S2 will become basic
S1 will become non-basic variable
(S2 column will have to take the
shape of S1: (0, 1, 0, 0)
R1 R1*(1/1.5) (0*(1/1.5)) (0*(1/1.5)) (0*(1/1.5)) (1*(1/1.5)) (1.5*(1/1.5)) (-0.5*(1/1.5)) (25*(1/1.5))
0 0 0 0.67 1 -0.33 16.67
Simplex Method - Procedure
Optimality check:
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.
S2 will become basic
S1 will become non-basic
variable
(S2 column will have to take
the shape of S1: (0, 1, 0, 0)
Z x1 x2 S1 S2 S3
R0 Z 1 0 0 0 -15 45 7350
R1 S2 0 0 0 0.67 1 -0.33 16.67
R2 x2 0 0 1 0 1 0 50
R3 x1 0 1 0 0 -1.5 0.5 15
right side
Row
basic var.
coefficients of:
R0 R0-(-15)*R1 (1+15*0) (0+15*0) (0+15*0) (0+15*0.67) (-15+15*1) (45+15*-0.33)(7350+15*16.67)
1 0 0 10 0 40 7600
R2 R2-(1)*R1 (0-1*0) (0-1*0) (1-1*0) (0-1*0.67) (1-1*1) (0-1*-0.33) (50-1*16.67)
0 0 1 -0.67 0 0.33 33.33
R3 R3-(-1.5)*R1 (0+1.5*0) (1+1.5*0) (0+1.5*0) (0+1.5*0.67) (-1.5+1.5*1)(0.5+1.5*-0.33)(15+1.5*16.67)
0 1 0 1 0 0 40
Simplex Method - Procedure
Optimality check:
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.
OPTIMAL SOLUTION!
Z x1 x2 S1 S2 S3
R0 Z 1 0 0 10 0 40 7600
R1 S2 0 0 0 0.67 1 -0.33 16.67
R2 x2 0 0 1 -0.67 0 0.33 33.33
R3 x1 0 1 0 1 0 0 40
Row
basic var.
coefficients of:
right side
Z = 7600
S2 = 16.67
X2 = 33.33
x1 = 40
S1 = 0
S3 = 0
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B)
X1 = 40  Planted 40 ha of pine
X2 = 33.33  Planted 33.33 ha of eucalypt
S1 = 0  0 ha of area available for pine plant.
S2 = 16.67  16.67 ha of area available for eucalypt plant.
S3 = 0  no working hours available
(x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 30) z=7350 (C)
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A)
C= (15,50)
B= (0,50)
A= (0,0) E= (40,0)
D= (40,33)
(x1, x2) = (40,33.33) (x1, x2, S1, S2, S3) = (40, 33.33, 0, 16.67, 0) z=7600 (D)
Simplex Method – Graphical approach
Graphical Method Simplex Method
 Replace each inequality by an equality
 Find the set of points satisfying the equality (allows
to draw a line that cuts the plane into 2 half-planes)
 Find which half-plane satisfies the inequality
 Intercept all the half-plane areas to find the feasible
region (FR) – feasible solutions = (x1, x2) corners
 Draw iso-lines for the objective function to find the
optimal solution: (x1, x2) corner point of the FR
Simplex Method – Graphical approach
Graphical Method Simplex Method
 Replace each inequality by an equality
 Find the set of points satisfying the equality (allows
to draw a line that cuts the plane into 2 half-planes)
 Find which half-plane satisfies the inequality
 Intercept all the half-plane areas to find the feasible
region (FR) – feasible solutions = (x1, x2) corners
 Draw iso-lines for the objective function to find the
optimal solution: (x1, x2) corner point of the FR
 Replace each inequality by an equality adding a slack variable
 Transform the objective function into an equality
 Build a table for the constraints only specifying the coefficients
 Set x1 and x2 to ZERO =>x1=0; x2=0; S1=40; S2=50; S3=180
 Test different combinations of basic variables
• Select the non-basic var. that results in a bigger increase in Z (the
smallest coefficient in R0)
• Select the basic var. that guarantees the biggest increase in Z
without leaving the feasible region and that all basic variables are
nonnegative (smallest positive ratio)
• Gaussian elimination so that the new basic var. only has: 0,1
• Test optimality: all coeff. in R0 >=0? If not, test new combination
Basic variables
Non-basic variables
Simplex Method
Particular cases
Simplex Method – Particular cases
• Tie for the Entering BV:
– Entering variable: Choose the entering variable (in a max problem) to be the
NBV with the most negative coefficient in Row 0.
– What to do when there is a tie for the entering basic variable ? Selection
made arbitrarily.
Z x1 x2 S1 S2 S3
R0 Z 1 -3 -3 0 0 0 0
R1 S1 0 1 0 1 0 0 4
R2 S2 0 0 2 0 1 0 12
R3 S3 0 3 2 0 0 1 18
Row
basic var.
coefficients of:
right side
Simplex Method – Particular cases
• Tie for the Leaving BV - Degenerate:
– Leaving BV: apply minimum ratio test - identify the row with the smallest
positive ratio bi /aij (the most restrictive Row); the BV for this row is the leaving
BV (it becomes nonbasic).
Z x1 x2 S1 S2 S3 S4
R0 Z 1 -3 -4 0 0 0 0 0
R1 S1 0 1 1 1 0 0 0 10 10 / 1 = 10
R2 S2 0 2 3 0 1 0 0 18 18 / 3 = 6
R3 S3 0 1 0 0 0 1 0 8 -
R4 S4 0 0 1 0 0 0 1 6 6 / 1 = 6
R0 Z 1 -3 0 0 0 0 4 24
R1 S1 0 1 0 1 0 0 -1 4
R2 S2 0 2 0 0 1 0 -3 0
R3 S3 0 1 0 0 0 1 0 8
R4 X2 0 0 1 0 0 0 1 6
right
side
Row
basic var.
coefficients of:
- Choose the leaving
variable arbitrary
- basic variables with a
value of zero are called
degenerate
- continue the Simplex
procedure until
optimality is reached
Simplex Method – Particular cases
• No leaving BV – Unbounded Z:
Occurs if all the coefficients in the pivot column (where the entering basic variable is) are
either negative or zero (excluding row 0)
No solution – when the constraints do not prevent improving the objective function
indefinitely
Z x1 x2 S1 S2 S3
R0 Z 1 0 -1 1 0 0 10
R1 x1 0 1 0 1 0 0 10 -
R2 S2 0 0 -3 -1 1 0 5 5 / -3 < 0
R3 S3 0 0 -1 -1 0 1 10 10/ -1 < 0
Row
basic var.
coefficients of:
right side
Simplex Method – Particular cases
• Multiple optimal solutions:
When a NBV has a zero coefficient in
row 0, then we perform one more
iteration to identify the other optimal
BF solution.
Z x1 x2 S1 S2 S3
R0 Z 1 -3 -2 0 0 0 0
R1 X1 0 1 0 1 0 0 4
R2 S2 0 0 2 0 1 0 12
R3 S3 0 3 2 0 0 1 18
R0 Z 1 0 -2 3 0 0 12
R1 X1 0 1 0 1 0 0 4 -
R2 S2 0 0 2 0 1 0 12 12 / 2 = 6
R3 S3 0 0 2 -3 0 1 6 6 / 2 = 3
R0 Z 1 0 0 0 0 1 18
R1 X1 0 1 0 1 0 0 4 4 / 1 = 4
R2 S2 0 0 0 3 1 -1 6 6 / 3 = 2
R3 X2 0 0 1 -1.5 0 0.5 3 -
R0 Z 1 0 0 0 0 1 18
R1 X1 0 1 0 0 0 0 2
R2 S1 0 0 0 1 0.33 -0.33 2
R3 X2 0 0 1 0 1 0 6
Row
basic var.
coefficients of:
right side
Simplex Method
Other cases
To be continued
Simplex Method
Exercises
Simplex Method - exercises
• 1) A company produces 3 different products: A, B and C. Each product has to go under 3
processes consuming different amounts of time along the way. The time available for
each process is described in the table below.
Assuming the selling profits for products A, B and C are 2, 3 and 4€ per unit. Determine
how many units of each product should be produced to maximize the profit.
Was there any time left?
Process
Total number of
hours available
Number of hours needed to produce each
product
A B C
I 12000 5 2 4
II 24000 4 5 6
III 18000 3 5 4
Simplex Method - exercises
• 2) A company produces 3 diferente bookshelves: a luxury, a regular and na exportation
model. Consider the maximum demand for each model to be 500, 750 and 400
respectively. The working hours at the carpentry and finishing sections have the working
time limitations below:
Assuming the selling profit for the luxury, regular and exportation models is 1500, 1300
2500 respectively, formulate the LP problema in order to maximize the profit.
Interpret the results detailling the optimal number of bookshelves of each type produced
discussing the total amount of hours used in each section. How far from meeting the
maximum demands were we?
Section Total
number of
hours
(thousands)
Number of hours needed to produce each
model
luxury regular exportation
carpentry 1.4 0.5 0.5 1.0
finishing 1.2 0.5 0.5 2.0
Simplex Method - exercises
• 3) Max: Z = x1 + 2 x2
Subject to:
2x1 + 4x2 ≤ 20
x1 + x2 ≤ 8
and x1 x2 ≥ 0
• 4) Max: Z = x1 + x2
Subject to:
x1 + x2 ≤ 4
2 x1 + x2 ≤ 6
x1 + 2 x2 ≤ 6
and x1 x2 ≥ 0
• 5) Max: Z = x1 + x2
Subject to:
x1 + x2 ≤ 10
2 x1 - 3 x2 ≤ 15
x1 - 2 x2 ≤ 20
and x1 x2 ≥ 0
Apply the Simplex to find the optimal solution
Multiple, unbound and degenerate solutions
Simplex Method - exercises
Max: Z = 10 x1 + 30 x2
Subject to:
x1 ≤ 15
x1 - x2 ≤ 20
-3 x1 + x2 ≤ -30
and x1 ≥ 0 x2 ≤ 0
• 7)
• 8)
Bring the following PL problems to standard form and
apply the Simplex to find the optimal solution
Minimization, negative RHS, negative and unbounded
variables
• 6) Min: Z = 2 x1 - 3 x2 – 4 x3
Subject to:
x1 + 5x2 - 3x3 ≤ 15
x1 + x2 + x3 ≤ 11
5 x1 – 6 x2 + x3 ≤ 4
and x1 x2 x3 ≥ 0
Max: Z = - x2
Subject to:
x1 + x2 + x3 ≤ 100
x1 - 5 x2 ≤ 40
x3 ≥ -10
and x1 ≥ 0 x2 ≤ 0 x3 unbounded
Simplex Method - exercises
• 10)
Bring the following PL problems to standard form introducing artificial
variables apply the big M method using Simplex to find the optimal
solutions
• 9) Max: Z = x1 + 2 x2
Subject to: x1 + x2 ≤ 10
x1 - 2 x2 ≥ 6
x1, x2 ≥ 0
Min: Z = 4 x1 + 2 x2
Subject to: 2 x1 - x2 ≥ 4
x1 + x2 ≥ 5
x1, x2 ≥ 0

Contenu connexe

Tendances

LPP, Duality and Game Theory
LPP, Duality and Game TheoryLPP, Duality and Game Theory
LPP, Duality and Game TheoryPurnima Pandit
 
Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,Dronak Sahu
 
Linear programming using the simplex method
Linear programming using the simplex methodLinear programming using the simplex method
Linear programming using the simplex methodShivek Khurana
 
Simplex Method
Simplex MethodSimplex Method
Simplex Methodkzoe1996
 
Graphical Method
Graphical MethodGraphical Method
Graphical MethodSachin MK
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear ProgrammingSukhpalRamanand
 
Linear Programming Problems : Dr. Purnima Pandit
Linear Programming Problems : Dr. Purnima PanditLinear Programming Problems : Dr. Purnima Pandit
Linear Programming Problems : Dr. Purnima PanditPurnima Pandit
 
Artificial Variable Technique –
Artificial Variable Technique –Artificial Variable Technique –
Artificial Variable Technique –itsvineeth209
 
The Big M Method - Operation Research
The Big M Method - Operation ResearchThe Big M Method - Operation Research
The Big M Method - Operation Research2013901097
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method ExplainedAtif Shahzad
 
Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation CaseJoseph Konnully
 
Simplex Method
Simplex MethodSimplex Method
Simplex MethodSachin MK
 

Tendances (20)

LPP, Duality and Game Theory
LPP, Duality and Game TheoryLPP, Duality and Game Theory
LPP, Duality and Game Theory
 
Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Linear programming using the simplex method
Linear programming using the simplex methodLinear programming using the simplex method
Linear programming using the simplex method
 
Big-M Method Presentation
Big-M Method PresentationBig-M Method Presentation
Big-M Method Presentation
 
Operations Research - The Big M Method
Operations Research - The Big M MethodOperations Research - The Big M Method
Operations Research - The Big M Method
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Graphical Method
Graphical MethodGraphical Method
Graphical Method
 
Simplex two phase
Simplex two phaseSimplex two phase
Simplex two phase
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 
Linear Programming Problems : Dr. Purnima Pandit
Linear Programming Problems : Dr. Purnima PanditLinear Programming Problems : Dr. Purnima Pandit
Linear Programming Problems : Dr. Purnima Pandit
 
Big m method
Big   m methodBig   m method
Big m method
 
Artificial Variable Technique –
Artificial Variable Technique –Artificial Variable Technique –
Artificial Variable Technique –
 
The Big M Method - Operation Research
The Big M Method - Operation ResearchThe Big M Method - Operation Research
The Big M Method - Operation Research
 
Simplex Method Explained
Simplex Method ExplainedSimplex Method Explained
Simplex Method Explained
 
Simplex Algorithm
Simplex AlgorithmSimplex Algorithm
Simplex Algorithm
 
Big M method
Big M methodBig M method
Big M method
 
Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation Case
 
Linear programming ppt
Linear programming pptLinear programming ppt
Linear programming ppt
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 

Similaire à Simplex Method.pptx

OR presentation simplex.pptx
OR presentation simplex.pptxOR presentation simplex.pptx
OR presentation simplex.pptxpranalpatilPranal
 
Lecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdfLecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdfVishalPusadkar1
 
matrices and algbra
matrices and algbramatrices and algbra
matrices and algbragandhinagar
 
optimization simplex method introduction
optimization simplex method introductionoptimization simplex method introduction
optimization simplex method introductionKunal Shinde
 
simplex method for operation research .pdf
simplex method for operation research .pdfsimplex method for operation research .pdf
simplex method for operation research .pdfmohammedsaaed1
 
Operations Research Problem
Operations Research  ProblemOperations Research  Problem
Operations Research ProblemTaslima Mujawar
 
Simplex method: Slack, Surplus & Artificial variable
Simplex method:  Slack, Surplus & Artificial variableSimplex method:  Slack, Surplus & Artificial variable
Simplex method: Slack, Surplus & Artificial variableDevyaneeDevyanee2007
 
Two Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingTwo Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingManas Lad
 
Sparsenet
SparsenetSparsenet
Sparsenetndronen
 
Trigonometric ratios and identities 1
Trigonometric ratios and identities 1Trigonometric ratios and identities 1
Trigonometric ratios and identities 1Sudersana Viswanathan
 
Sistempertidaksamaanduavariabel2122
Sistempertidaksamaanduavariabel2122Sistempertidaksamaanduavariabel2122
Sistempertidaksamaanduavariabel2122Franxisca Kurniawati
 
simplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universitysimplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universityshobhakedari59
 
Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4Ed Dansereau
 

Similaire à Simplex Method.pptx (20)

OR presentation simplex.pptx
OR presentation simplex.pptxOR presentation simplex.pptx
OR presentation simplex.pptx
 
Lecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdfLecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdf
 
2. lp iterative methods
2. lp   iterative methods2. lp   iterative methods
2. lp iterative methods
 
matrices and algbra
matrices and algbramatrices and algbra
matrices and algbra
 
optimization simplex method introduction
optimization simplex method introductionoptimization simplex method introduction
optimization simplex method introduction
 
4-The Simplex Method.ppt
4-The Simplex Method.ppt4-The Simplex Method.ppt
4-The Simplex Method.ppt
 
Chapter four
Chapter fourChapter four
Chapter four
 
simplex method for operation research .pdf
simplex method for operation research .pdfsimplex method for operation research .pdf
simplex method for operation research .pdf
 
Operations Research Problem
Operations Research  ProblemOperations Research  Problem
Operations Research Problem
 
5163147.ppt
5163147.ppt5163147.ppt
5163147.ppt
 
Simplex method: Slack, Surplus & Artificial variable
Simplex method:  Slack, Surplus & Artificial variableSimplex method:  Slack, Surplus & Artificial variable
Simplex method: Slack, Surplus & Artificial variable
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
TABREZ KHAN.ppt
TABREZ KHAN.pptTABREZ KHAN.ppt
TABREZ KHAN.ppt
 
Two Phase Method- Linear Programming
Two Phase Method- Linear ProgrammingTwo Phase Method- Linear Programming
Two Phase Method- Linear Programming
 
Sparsenet
SparsenetSparsenet
Sparsenet
 
Trigonometric ratios and identities 1
Trigonometric ratios and identities 1Trigonometric ratios and identities 1
Trigonometric ratios and identities 1
 
Sistempertidaksamaanduavariabel2122
Sistempertidaksamaanduavariabel2122Sistempertidaksamaanduavariabel2122
Sistempertidaksamaanduavariabel2122
 
simplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universitysimplex method-maths 4 mumbai university
simplex method-maths 4 mumbai university
 
Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4
 

Dernier

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 

Dernier (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 

Simplex Method.pptx

  • 1. The Simplex Method Susana Barreiro 17 March 2021
  • 2. The Simplex Method • The Simplex Method • The Simplex Method - formulation (standard form) • The Simplex Method - procedure • The Simplex Method - particular cases o Tie for the Entering BV o Tie for the Leaving BV - degenerate o No leaving BV – Unbounded Z o Multiple optimal solutions • The Simplex Method - other cases o Minimization of the objective function o Negative Right Hand Sides o Eliminating negative variables o Functional constraints in ≥ and = form o Eliminating unconstrained variables • The Simplex Method – Exercises
  • 3. Simplex Method • The graphical approach can be used for two-variable LP problems • Unfortunately, most real-life LPs problems require a method to find optimal solutions capable of dealing with several variables: the simplex algorithm In the classes we will focus on the manual application of the simplex algorithm (using EXCEL), although computer packages to apply the simplex algorithm have been developed (LINDO and LINGO)
  • 5. Simplex Method - Formulation In LP problem, the decision maker usually wants to: maximize (usually revenue or profit) mminimize (usually costs) the objective function (Z) is expressed by a set of decision variables Certain limitations are often imposed to these decision variables (expressed in the form of ≤, = or ≥). These restrictions are called constraints Max: Z = 90 x1 + 120 x2 Subject to: x1 ≤ 40 x2 ≤ 50 2x1 + 3x2 ≤ 180 and x1 ≥ 0; x2 ≥ 0 (ha of pine) (ha of eucalypt) (days of work) (€/yr) Poets’ Problem
  • 6. Simplex Method - Formulation • 1) Objective function is maximized • 2) Constraints in the form of ≤ inequalities • 3) All values on the right handside are ≥ • 4) All variables are nonnegative (≥) The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric concepts that requires LP problems to be presented in the standard form: Max: Z = 90 x1 + 120 x2 Subject to: x1 ≤ 40 x2 ≤ 50 2x1 + 3x2 ≤ 180 and x1 ≥ 0; x2 ≥ 0 (ha of pine) (ha of eucalypt) (days of work) (€/yr)
  • 7. Simplex Method - Formulation The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric concepts that must be translated into algebraic language to allow solving systems of equations. 1st - transform all inequalities into equalities by introducing one additional variable to each constraint (the slack variables: S1, S2, S3). Max: Z = 90 x1 + 120 x2 Subject to: x1 + S1 = 40 x2 + S2 = 50 2x1 + 3x2 + S3 = 180 and x1 x2 S1 S2 S3 ≥ 0 Max: Z = 90 x1 + 120 x2 Subject to: x1 + S1 ≤ 40 x2 + S2 ≤ 50 2x1 + 3x2 + S3 ≤ 180 and x1 x2 S1 S2 S3 ≥ 0 Original form: Standard or augmented form:
  • 8. Simplex Method - Formulation The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric concepts that must be translated into algebraic language to allow solving systems of equations. 1st - transform all inequalities into equalities by introducing one additional variable to each constraint (the slack variables: S1, S2, S3). 2nd - transform the objective function into an additional constraint Max: Z = 90 x1 + 120 x2 Subject to: x1 + S1 = 40 x2 + S2 = 50 2x1 + 3x2 + S3 = 180 and x1 , x2 , S1 , S2 , S3 ≥ 0 Z - 90 x1 - 120 x2 = 0 x1 + S1 = 40 x2 + S2 = 50 2x1 + 3x2 + S3 = 180
  • 9. Simplex Method - Formulation The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric concepts that must be translated into algebraic language to allow solving systems of equations. 1st - transform all inequalities into equalities by introducing one additional variable to each constraint (the slack variables: S1, S2, S3). 2nd - transform the objective function into an additional constraint 3rd - build the Simplex tabular form where only the essential information is recorded Z - 90 x1 - 120 x2 = 0 x1 + S1 = 40 x2 + S2 = 50 2x1 + 3x2 + S3 = 180
  • 10. Simplex Method - Formulation The Simplex algorithm is an algebraic procedure to solve LP problems based on geometric concepts that must be translated into algebraic language to allow solving systems of equations. 1st - transform all inequalities into equalities by introducing one additional variable to each constraint (the slack variables: S1, S2, S3). 2nd - transform the objective function into an additional constraint 3rd - build the Simplex tabular form where only the essential information is recorded Basic variables Non-basic variables initialize the procedure setting x1 = x2 = 0 Each basic feasible solution has basic or non-basic variables - non-basic variables are set to ZERO - basic variables are directly obtained from the table (X1, X2, S1, S2, S3 ) =( 0, 0, 40, 50, 180)
  • 11. Simplex Method - Graphical analysis • The Simplex algorithm is a search procedure that: - shifts through the set of basic feasible solutions, one at a time, until the optimal basic feasible solution (whenever it exists) is identified. - the method is an efficient implementation the Corner Points Procedure. C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33) Corner point feasible solutions – vertices of the feasible region Optimal solution(s) – vertice(s) of the feasible region that maximize Z, ie solution that gives the best favorable value to the objective function
  • 12. Simplex Method - Graphical analysis • The Simplex algorithm is a search procedure that: - shifts through the set of basic feasible solutions, one at a time, until the optimal basic feasible solution (whenever it exists) is identified. - the method is an efficient implementation the Corner Points Procedure. C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33) Replacing X1 and X2 by the values of A, B, C, D and E in the objective function: ZA= 0 ZB= 6000 ZC= 7350 ZD= 7600 ZE = 3600 Z = 90 x1 + 120 x2
  • 13. Simplex Method - Graphical analysis • The Simplex algorithm is a search procedure that: - shifts through the set of basic feasible solutions, one at a time, until the optimal basic feasible solution (whenever it exists) is identified. - the method is an efficient implementation the Corner Points Procedure. C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33) Feasible solutions – within or on the border of the feasible region ie solutions for which the constraints are satisfied Infeasible solution – outside the feasible region, ie solution for which at least one constraint is violated
  • 14. Simplex Method - Formulation Bring the LP problem to the standard form -> obtain a BFS ie set A= (x1, x2) = (0, 0) Find another feasible solution Find in which direction to move towards the algebraic equivalent of an extreme point ie a Basic Feasible Solution with a single different basic variable Swap the non-basic variable with one of the basic variables Apply Gaussian elimination to transform the new basic variable to (0,1) while solving for Z No Optimality check C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33) A = (X1, X2, S1, S2, S3 ) = ( 0, 0, 40, 50, 180) B = (X1, X2, S1, S2, S3 ) = ( 0, 50, 40, 0, 30) C = (X1, X2, S1, S2, S3 ) = (15, 50, 0, 25, 0 ) A B C basic S1, S2, S3 S1, X2, S3 X1, X2, S2 non-basic X1, X2 X1, S2 S1, S3 A is adjacent to B but not to C B is adjacent to both A and C
  • 16. Simplex Method - Procedure Bring the LP problem to the standard form -> obtain a BFS ie set (x1, x2) = (0, 0) Find another feasible solution Entering variable: Choose the entering variable (in a max problem) to be the NBV with the most negative coefficient in Row 0. Ties may be broken in an arbitrary fashion. Leaving BV: apply minimum ratio test - identify the row with the smallest ratio RHS /aij (the most restrictive Row); the BV for this row is the leaving BV (it becomes nonbasic). Apply Gauss-Jordan elimination procedure to solve the system of linear equations. No Optimality check: The current BFS is optimal (in a max LP) if every coefficient in Row 0 is ≥ 0. Optimal feasible solution found – STOP SIMPLEX Yes
  • 17. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 18. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 19. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 20. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 21. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 22. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 23. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 24. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 25. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 26. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 27. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 28. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 29. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 30. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 31. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 -120 0 0 0 0 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 3 0 0 1 180 Row basic var. coefficients of: right side -120 -> 0 3 -> 0 R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30
  • 32. Simplex Method - Procedure R0 R0-(-120)*R2 (1+120*0) (-90+120*0) (-120+120*1) (0+120*0) (0+120*1) (0+120*0) (0+120*50) 1 -90 0 0 120 0 6000 R1 0 1 0 1 0 0 40 R2 0 0 1 0 1 0 50 R3 R3-(3)*R2 (0-3*0) (2-3*0) (3-3*1) (0-3*0) (0-3*1) (1-3*0) (180-3*50) 0 2 0 0 -3 1 30 Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 Row basic var. coefficients of: right side
  • 33. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 Row basic var. coefficients of: right side Z = 6000 S1 = 40 X2 = 50 S3 = 30 X1 = 0 S2 = 0 (x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) X1 = 0  Plant 0 ha of pine X2 = 50  Plant 50 ha of eucalypt S1 = 40  40 ha of area available for pine plant. S2 = 0  no ha of area available for eucalypt plant. S3 = 30  30 working hours still available
  • 34. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 Row basic var. coefficients of: right side Z = 6000 S1 = 40 X2 = 50 S3 = 30 X1 = 0 S2 = 0 (x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) (x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) The basic variables in these solutions differ in one single variable (S1 and S3 are maintained as basic variables) These are adjacent solutions
  • 35. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 Row basic var. coefficients of: right side Z = 6000 S1 = 40 X2 = 50 S3 = 30 X1 = 0 S2 = 0 (x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) (x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33)
  • 36. Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 40/1= 40 R2 x2 0 0 1 0 1 0 50 - R3 S3 0 2 0 0 -3 1 30 30/2= 15 ratio Row basic var. coefficients of: right side Simplex Method - Procedure X1 will become basic S3 will become non-basic variable (X1 column will have to take the shape of S3: (0, 0, 0, 1) Optimality check: The current BFS is optimal (in a max LP) if every coefficient in Row 0 is ≥ 0.
  • 37. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 40/1= 40 R2 x2 0 0 1 0 1 0 50 - R3 S3 0 2 0 0 -3 1 30 -30/-2= 15 ratio Row basic var. coefficients of: right side Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 -3 r Row basic var. coefficients of: right side R3 R3*(1/2) (0*(1/2)) (2*(1/2)) (0*(1/2)) (0*(1/2)) (-3*(1/2)) (1*(1/2)) (30*(1/2)) 0 1 0 0 -1.5 0.5 15
  • 38. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 -3 r Row basic var. coefficients of: right side Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 x1 0 1 0 0 -1.5 0.5 15 Row basic var. coefficients of: right side -90 -> 0 1 -> 0 R0 R0-(-90)*R3 (1+90*0) (-90+90*1) (0+90*0) (0+90*0) (120+90*-1.5) (0+90*0.5) (6000+90*15) 1 0 0 0 -15 45 7350 R1 R1-(1)*R3 (0-1*0) (1-1*1) (0-1*0) (1-1*0) (0-1*-1.5) (0-1*0.5) (40-1*40) 0 0 0 1 1.5 -0.5 25
  • 39. Simplex Method - Procedure Z x1 x2 S1 S2 S3 R0 Z 1 -90 0 0 120 0 6000 R1 S1 0 1 0 1 0 0 40 R2 x2 0 0 1 0 1 0 50 R3 S3 0 2 0 0 -3 1 30 -3 r Row basic var. coefficients of: right side Z x1 x2 S1 S2 S3 R0 Z 1 0 0 0 -15 45 7350 R1 S1 0 0 0 1 1.5 -0.5 25 R2 x2 0 0 1 0 1 0 50 R3 x1 0 1 0 0 -1.5 0.5 15 Row basic var. coefficients of: right side Z = 7350 S1 = 25 X2 = 50 x1 = 15 S2 = 0 S3 = 0 (x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B) X1 = 15  Planted 15 ha of pine X2 = 50  Planted 50 ha of eucalypt S1 = 25  25 ha of area available for pine plant. S2 = 0  no ha of area available for eucalypt plant. S3 = 0  no working hours available (x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 0) z=7350 (C) (x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A) C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33)
  • 40. Simplex Method - Procedure Optimality check: The current BFS is optimal (in a max LP) if every coefficient in Row 0 is ≥ 0. Z x1 x2 S1 S2 S3 R0 Z 1 0 0 0 -15 45 7350 R1 S1 0 0 0 1 1.5 -0.5 25 25/1.5= 17 R2 x2 0 0 1 0 1 0 50 - R3 x1 0 1 0 0 -1.5 0.5 15 15/-1.5= -10 Row basic var. coefficients of: right side ratio Entering variable: the most negative coefficient in Row 0 Leaving BV: the smallest positive ratio RHS /aij S2 will become basic S1 will become non-basic variable (S2 column will have to take the shape of S1: (0, 1, 0, 0) R1 R1*(1/1.5) (0*(1/1.5)) (0*(1/1.5)) (0*(1/1.5)) (1*(1/1.5)) (1.5*(1/1.5)) (-0.5*(1/1.5)) (25*(1/1.5)) 0 0 0 0.67 1 -0.33 16.67
  • 41. Simplex Method - Procedure Optimality check: The current BFS is optimal (in a max LP) if every coefficient in Row 0 is ≥ 0. S2 will become basic S1 will become non-basic variable (S2 column will have to take the shape of S1: (0, 1, 0, 0) Z x1 x2 S1 S2 S3 R0 Z 1 0 0 0 -15 45 7350 R1 S2 0 0 0 0.67 1 -0.33 16.67 R2 x2 0 0 1 0 1 0 50 R3 x1 0 1 0 0 -1.5 0.5 15 right side Row basic var. coefficients of: R0 R0-(-15)*R1 (1+15*0) (0+15*0) (0+15*0) (0+15*0.67) (-15+15*1) (45+15*-0.33)(7350+15*16.67) 1 0 0 10 0 40 7600 R2 R2-(1)*R1 (0-1*0) (0-1*0) (1-1*0) (0-1*0.67) (1-1*1) (0-1*-0.33) (50-1*16.67) 0 0 1 -0.67 0 0.33 33.33 R3 R3-(-1.5)*R1 (0+1.5*0) (1+1.5*0) (0+1.5*0) (0+1.5*0.67) (-1.5+1.5*1)(0.5+1.5*-0.33)(15+1.5*16.67) 0 1 0 1 0 0 40
  • 42. Simplex Method - Procedure Optimality check: The current BFS is optimal (in a max LP) if every coefficient in Row 0 is ≥ 0. OPTIMAL SOLUTION! Z x1 x2 S1 S2 S3 R0 Z 1 0 0 10 0 40 7600 R1 S2 0 0 0 0.67 1 -0.33 16.67 R2 x2 0 0 1 -0.67 0 0.33 33.33 R3 x1 0 1 0 1 0 0 40 Row basic var. coefficients of: right side Z = 7600 S2 = 16.67 X2 = 33.33 x1 = 40 S1 = 0 S3 = 0 (x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B) X1 = 40  Planted 40 ha of pine X2 = 33.33  Planted 33.33 ha of eucalypt S1 = 0  0 ha of area available for pine plant. S2 = 16.67  16.67 ha of area available for eucalypt plant. S3 = 0  no working hours available (x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 30) z=7350 (C) (x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A) C= (15,50) B= (0,50) A= (0,0) E= (40,0) D= (40,33) (x1, x2) = (40,33.33) (x1, x2, S1, S2, S3) = (40, 33.33, 0, 16.67, 0) z=7600 (D)
  • 43. Simplex Method – Graphical approach Graphical Method Simplex Method  Replace each inequality by an equality  Find the set of points satisfying the equality (allows to draw a line that cuts the plane into 2 half-planes)  Find which half-plane satisfies the inequality  Intercept all the half-plane areas to find the feasible region (FR) – feasible solutions = (x1, x2) corners  Draw iso-lines for the objective function to find the optimal solution: (x1, x2) corner point of the FR
  • 44. Simplex Method – Graphical approach Graphical Method Simplex Method  Replace each inequality by an equality  Find the set of points satisfying the equality (allows to draw a line that cuts the plane into 2 half-planes)  Find which half-plane satisfies the inequality  Intercept all the half-plane areas to find the feasible region (FR) – feasible solutions = (x1, x2) corners  Draw iso-lines for the objective function to find the optimal solution: (x1, x2) corner point of the FR  Replace each inequality by an equality adding a slack variable  Transform the objective function into an equality  Build a table for the constraints only specifying the coefficients  Set x1 and x2 to ZERO =>x1=0; x2=0; S1=40; S2=50; S3=180  Test different combinations of basic variables • Select the non-basic var. that results in a bigger increase in Z (the smallest coefficient in R0) • Select the basic var. that guarantees the biggest increase in Z without leaving the feasible region and that all basic variables are nonnegative (smallest positive ratio) • Gaussian elimination so that the new basic var. only has: 0,1 • Test optimality: all coeff. in R0 >=0? If not, test new combination Basic variables Non-basic variables
  • 46. Simplex Method – Particular cases • Tie for the Entering BV: – Entering variable: Choose the entering variable (in a max problem) to be the NBV with the most negative coefficient in Row 0. – What to do when there is a tie for the entering basic variable ? Selection made arbitrarily. Z x1 x2 S1 S2 S3 R0 Z 1 -3 -3 0 0 0 0 R1 S1 0 1 0 1 0 0 4 R2 S2 0 0 2 0 1 0 12 R3 S3 0 3 2 0 0 1 18 Row basic var. coefficients of: right side
  • 47. Simplex Method – Particular cases • Tie for the Leaving BV - Degenerate: – Leaving BV: apply minimum ratio test - identify the row with the smallest positive ratio bi /aij (the most restrictive Row); the BV for this row is the leaving BV (it becomes nonbasic). Z x1 x2 S1 S2 S3 S4 R0 Z 1 -3 -4 0 0 0 0 0 R1 S1 0 1 1 1 0 0 0 10 10 / 1 = 10 R2 S2 0 2 3 0 1 0 0 18 18 / 3 = 6 R3 S3 0 1 0 0 0 1 0 8 - R4 S4 0 0 1 0 0 0 1 6 6 / 1 = 6 R0 Z 1 -3 0 0 0 0 4 24 R1 S1 0 1 0 1 0 0 -1 4 R2 S2 0 2 0 0 1 0 -3 0 R3 S3 0 1 0 0 0 1 0 8 R4 X2 0 0 1 0 0 0 1 6 right side Row basic var. coefficients of: - Choose the leaving variable arbitrary - basic variables with a value of zero are called degenerate - continue the Simplex procedure until optimality is reached
  • 48. Simplex Method – Particular cases • No leaving BV – Unbounded Z: Occurs if all the coefficients in the pivot column (where the entering basic variable is) are either negative or zero (excluding row 0) No solution – when the constraints do not prevent improving the objective function indefinitely Z x1 x2 S1 S2 S3 R0 Z 1 0 -1 1 0 0 10 R1 x1 0 1 0 1 0 0 10 - R2 S2 0 0 -3 -1 1 0 5 5 / -3 < 0 R3 S3 0 0 -1 -1 0 1 10 10/ -1 < 0 Row basic var. coefficients of: right side
  • 49. Simplex Method – Particular cases • Multiple optimal solutions: When a NBV has a zero coefficient in row 0, then we perform one more iteration to identify the other optimal BF solution. Z x1 x2 S1 S2 S3 R0 Z 1 -3 -2 0 0 0 0 R1 X1 0 1 0 1 0 0 4 R2 S2 0 0 2 0 1 0 12 R3 S3 0 3 2 0 0 1 18 R0 Z 1 0 -2 3 0 0 12 R1 X1 0 1 0 1 0 0 4 - R2 S2 0 0 2 0 1 0 12 12 / 2 = 6 R3 S3 0 0 2 -3 0 1 6 6 / 2 = 3 R0 Z 1 0 0 0 0 1 18 R1 X1 0 1 0 1 0 0 4 4 / 1 = 4 R2 S2 0 0 0 3 1 -1 6 6 / 3 = 2 R3 X2 0 0 1 -1.5 0 0.5 3 - R0 Z 1 0 0 0 0 1 18 R1 X1 0 1 0 0 0 0 2 R2 S1 0 0 0 1 0.33 -0.33 2 R3 X2 0 0 1 0 1 0 6 Row basic var. coefficients of: right side
  • 52. Simplex Method - exercises • 1) A company produces 3 different products: A, B and C. Each product has to go under 3 processes consuming different amounts of time along the way. The time available for each process is described in the table below. Assuming the selling profits for products A, B and C are 2, 3 and 4€ per unit. Determine how many units of each product should be produced to maximize the profit. Was there any time left? Process Total number of hours available Number of hours needed to produce each product A B C I 12000 5 2 4 II 24000 4 5 6 III 18000 3 5 4
  • 53. Simplex Method - exercises • 2) A company produces 3 diferente bookshelves: a luxury, a regular and na exportation model. Consider the maximum demand for each model to be 500, 750 and 400 respectively. The working hours at the carpentry and finishing sections have the working time limitations below: Assuming the selling profit for the luxury, regular and exportation models is 1500, 1300 2500 respectively, formulate the LP problema in order to maximize the profit. Interpret the results detailling the optimal number of bookshelves of each type produced discussing the total amount of hours used in each section. How far from meeting the maximum demands were we? Section Total number of hours (thousands) Number of hours needed to produce each model luxury regular exportation carpentry 1.4 0.5 0.5 1.0 finishing 1.2 0.5 0.5 2.0
  • 54. Simplex Method - exercises • 3) Max: Z = x1 + 2 x2 Subject to: 2x1 + 4x2 ≤ 20 x1 + x2 ≤ 8 and x1 x2 ≥ 0 • 4) Max: Z = x1 + x2 Subject to: x1 + x2 ≤ 4 2 x1 + x2 ≤ 6 x1 + 2 x2 ≤ 6 and x1 x2 ≥ 0 • 5) Max: Z = x1 + x2 Subject to: x1 + x2 ≤ 10 2 x1 - 3 x2 ≤ 15 x1 - 2 x2 ≤ 20 and x1 x2 ≥ 0 Apply the Simplex to find the optimal solution Multiple, unbound and degenerate solutions
  • 55. Simplex Method - exercises Max: Z = 10 x1 + 30 x2 Subject to: x1 ≤ 15 x1 - x2 ≤ 20 -3 x1 + x2 ≤ -30 and x1 ≥ 0 x2 ≤ 0 • 7) • 8) Bring the following PL problems to standard form and apply the Simplex to find the optimal solution Minimization, negative RHS, negative and unbounded variables • 6) Min: Z = 2 x1 - 3 x2 – 4 x3 Subject to: x1 + 5x2 - 3x3 ≤ 15 x1 + x2 + x3 ≤ 11 5 x1 – 6 x2 + x3 ≤ 4 and x1 x2 x3 ≥ 0 Max: Z = - x2 Subject to: x1 + x2 + x3 ≤ 100 x1 - 5 x2 ≤ 40 x3 ≥ -10 and x1 ≥ 0 x2 ≤ 0 x3 unbounded
  • 56. Simplex Method - exercises • 10) Bring the following PL problems to standard form introducing artificial variables apply the big M method using Simplex to find the optimal solutions • 9) Max: Z = x1 + 2 x2 Subject to: x1 + x2 ≤ 10 x1 - 2 x2 ≥ 6 x1, x2 ≥ 0 Min: Z = 4 x1 + 2 x2 Subject to: 2 x1 - x2 ≥ 4 x1 + x2 ≥ 5 x1, x2 ≥ 0