0% found this document useful (0 votes)
35 views56 pages

Week 11 MMW

The Simplex Method is an algebraic procedure for solving linear programming problems that involves 3 main steps: 1) Transforming the problem into standard form by introducing slack variables and making the objective function a constraint. 2) Building a Simplex table to record the basic and non-basic variables at each basic feasible solution. 3) Using a search procedure to iteratively shift between basic feasible solutions by changing the basic variables until the optimal solution is identified, which maximizes the objective function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views56 pages

Week 11 MMW

The Simplex Method is an algebraic procedure for solving linear programming problems that involves 3 main steps: 1) Transforming the problem into standard form by introducing slack variables and making the objective function a constraint. 2) Building a Simplex table to record the basic and non-basic variables at each basic feasible solution. 3) Using a search procedure to iteratively shift between basic feasible solutions by changing the basic variables until the optimal solution is identified, which maximizes the objective function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

The Simplex Method

Prepared by: Jennifer Pacomios


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:
Poets’ Problem
maximize (usually revenue or profit)
mminimize (usually costs)

Max: Z = 90 x1 + 120 x2 (€/yr)


the objective function (Z) is
expressed by a set of decision Subject to:
variables
(ha of pine)
x1 ≤ 40
Certain limitations are often
x2 ≤ 50 (ha of eucalypt)
imposed to these decision
variables (expressed in the form of 2x1 + 3x2 ≤ 180 (days of work)
≤, = or ≥).
These restrictions are called and x1 ≥ 0; x2 ≥ 0
constraints
Simplex Method - Formulation
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:

• 1) Objective function is maximized Max: Z = 90 x1 + 120 x2 (€/yr)

• 2) Constraints in the form of ≤ inequalitiesSubject to:


(ha of pine)
x1 ≤ 40
x2 ≤ 50 (ha of eucalypt)
(days of work)
• 3) All values on the right handside are ≥ 2x1 + 3x2 ≤ 180
• 4) All variables are nonnegative (≥)
and x1 ≥ 0; x2 ≥ 0
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).
Original form: Standard or augmented form:

Max: Z = 90 x1 + 120 x2 Max: Z = 90 x1 + 120 x2

Subject to: Subject to:


x1 + S1 ≤ 40 x1 + S1 = 40
x2 + S2 ≤ 50 x2 + S2 = 50
2x1 + 3x2 + S3 ≤ 180 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

Max: Z = 90 x1 + 120 x2

Z - 90 x1 - 120 x2 = 0
Subject to:
x1 + S1 = 40
x1 + S1 = 40
x2 + S2 = 50
x2 + S2 = 50
2x1 + 3x2 + S3 = 180
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
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
Non-basic Basic initialize the procedure setting x1 = x2 = 0
variables variables (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.


Corner point feasible solutions –
B= (0,50) C= (15,50) vertices of the feasible region
Optimal solution(s) – vertice(s) of
D= (40,33) the feasible region that maximize Z,
ie solution that gives the best
A= (0,0) E= (40,0) 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.


Replacing X1 and X2 by the values of A, B, C,
B= (0,50) C= (15,50) D and E in the objective function:
ZA= 0
D= (40,33) ZB= 6000
Z = 90 x1 + 120 x2
ZC= 7350
A= (0,0) E= (40,0)
ZD= 7600
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.

Feasible solutions – within or on the


B= (0,50) C= (15,50) border of the feasible region ie
solutions for which the constraints
are satisfied
D= (40,33)

Infeasible solution – outside the


A= (0,0) E= (40,0)
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)
Optimality check No 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
B= (0,50) C= (15,50) basic variable
Swap the
A = (X , Xnon-basic
, S , S , S )variable withAone of the to
is adjacent basic variables
B but not to C
1 2 1 2 3
B is adjacent to both A and C
D= (40,33) Apply= (Gaussian
0, 0, 40, 50, 180)
elimination to transform the new basic variable to
(0,1)
B =while
(X1, X2, solving
S1, S2, Sfor
3) Z A B C
A= (0,0) E= (40,0) = ( 0, 50, 40, 0, 30) basic S1, S2, S3 S1, X2, S3 X1, X2, S2
C = (X1, X2, S1, S2, S3 ) non-basic X1, X2 X 1, S 2 S1, S3
= (15, 50, 0, 25, 0 )
Simplex Method
Procedure
Simplex Method - Procedure
Bring the LP problem to the standard form -> obtain a BFS ie set (x1, x2) = (0, 0)

Optimality check:
The current BFS is optimal (in No Find another feasible solution
a max LP) if every coefficient
in Row 0 is ≥ 0. 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
Yes
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.

Optimal feasible solution found – STOP SIMPLEX


Simplex Method - Procedure
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 -120 0 0 0 0 -120 -> 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 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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
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

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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 0 0 120 0 6000
Z = 6000 X1 = 0
R1 S1 0 1 0 1 0 0 40 S1 = 40 S2 = 0
R2 x2 0 0 1 0 1 0 50 X2 = 50
R3 S3 0 2 0 0 -3 1 30 S3 = 30
(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
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180)

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 0 0 120 0 6000
Z = 6000 X1 = 0
R1 S1 0 1 0 1 0 0 40 S1 = 40 S2 = 0
R2 x2 0 0 1 0 1 0 50 X2 = 50
R3 S3 0 2 0 0 -3 1 30 S3 = 30
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30)

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
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180)

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 0 0 120 0 6000
Z = 6000 X1 = 0
R1 S1 0 1 0 1 0 0 40 S1 = 40 S2 = 0
R2 x2 0 0 1 0 1 0 50 X2 = 50
R3 S3 0 2 0 0 -3 1 30 S3 = 30
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30)

B= (0,50) C= (15,50)

D= (40,33)

A= (0,0) E= (40,0)
Optimality check:
Simplex Method - Procedure
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.

Row
coefficients of: X1 will become basic
basic var. Z x1 x2 S1 S2 S3 right side ratio S3 will become non-basic variable
R0 Z 1 -90 0 0 120 0 6000
R1 S1 0 1 0 1 0 0 40 40/1= 40
(X1 column will have to take the
shape of S3: (0, 0, 0, 1)
R2 x2 0 0 1 0 1 0 50 -
R3 S3 0 2 0 0 -3 1 30 30/2= 15
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side

Simplex Method - Procedure


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

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side ratio

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

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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side

Simplex Method - Procedure


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

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 -90 0 0 120 0 6000
-90 -> 0
R1 S1 0 1 0 1 0 0 40 1 -> 0
R2 x2 0 0 1 0 1 0 50
R3 x1 0 1 0 0 -1.5 0.5 15

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
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side

Simplex Method - Procedure


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

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 0 0 0 -15 45 7350
Z = 7350 S2 = 0
R1 S1 0 0 0 1 1.5 -0.5 25 S1 = 25 S3 = 0
R2 x2 0 0 1 0 1 0 50 X2 = 50
R3 x1 0 1 0 0 -1.5 0.5 15 x1 = 15
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A)
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B)
(x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 0) z=7350 (C)

B= (0,50) C= (15,50)
X1 = 15  Planted 15 ha of pine
X2 = 50  Planted 50 ha of eucalypt
S1 = 25  25 ha of area available for pine plant.
D= (40,33)
S2 = 0  no ha of area available for eucalypt plant.
S3 = 0  no working hours available
A= (0,0) E= (40,0)
Optimality check:
Simplex Method - Procedure
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side ratio
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

S2 will become basic Entering variable: the most negative coefficient in Row 0
S1 will become non-basic variable Leaving BV: the smallest positive ratio RHS /aij

(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
Optimality check:
Simplex Method - Procedure
The current BFS is optimal (in
a max LP) if every coefficient
in Row 0 is ≥ 0.

coefficients of:
Row S2 will become basic
basic var. Z x1 x2 S1 S2 S3 right side
S1 will become non-basic
R0 Z 1 0 0 0 -15 45 7350
variable
R1 S2 0 0 0 0.67 1 -0.33 16.67
R2 x2 0 0 1 0 1 0 50 (S2 column will have to take
R3 x1 0 1 0 0 -1.5 0.5 15 the shape of S1: (0, 1, 0, 0)

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
Optimality check:
The current BFS is optimal (in
Simplex Method - Procedure a max LP) if every coefficient
in Row 0 is ≥ 0.

coefficients of: OPTIMAL SOLUTION!


Row
basic var. Z x1 x2 S1 S2 S3 right side
R0 Z 1 0 0 10 0 40 7600
Z = 7600 S1 = 0
R1 S2 0 0 0 0.67 1 -0.33 16.67 S2 = 16.67 S3 = 0
R2 x2 0 0 1 -0.67 0 0.33 33.33 X2 = 33.33
R3 x1 0 1 0 1 0 0 40 x1 = 40
(x1, x2) = (0,0) (x1, x2, S1, S2, S3) = (0, 0, 40, 50, 180) z=0 (A)
(x1, x2) = (0,50) (x1, x2, S1, S2, S3) = (0, 50, 40, 0, 30) z=6000 (B)
(x1, x2) = (15,50) (x1, x2, S1, S2, S3) = (15, 50, 25, 0, 30) z=7350 (C)
(x1, x2) = (40,33.33) (x1, x2, S1, S2, S3) = (40, 33.33, 0, 16.67, 0) z=7600 (D)
B= (0,50) C= (15,50)

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. D= (40,33)
S2 = 16.67  16.67 ha of area available for eucalypt plant.
S3 = 0  no working hours available A= (0,0) E= (40,0)
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 adding a slack variable


 Transform the objective function into an equality
 Build a table for the constraints only specifying the coefficients
 Replace each inequality by an equality  Set x1 and x2 to ZERO =>x1=0; x2=0; S1=40; S2=50; S3=180
 Find the set of points satisfying the equality (allows Non-basic variables Basic variables

to draw a line that cuts the plane into 2 half-planes)  Test different combinations of basic variables
 Find which half-plane satisfies the inequality • Select the non-basic var. that results in a bigger increase in Z (the
smallest coefficient in R0)
 Intercept all the half-plane areas to find the feasible • Select the basic var. that guarantees the biggest increase in Z
region (FR) – feasible solutions = (x1, x2) corners without leaving the feasible region and that all basic variables are
nonnegative (smallest positive ratio)
 Draw iso-lines for the objective function to find the
• Gaussian elimination so that the new basic var. only has: 0,1
optimal solution: (x1, x2) corner point of the FR • Test optimality: all coeff. in R0 >=0? If not, test new combination
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.
coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
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
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).
- Choose the leaving Row
basic var. Z x1 x2
coefficients of:
S1 S2 S3 S4
right
side
variable arbitrary R0 Z 1 -3 -4 0 0 0 0 0
R1 S1 0 1 1 1 0 0 0 10 10 / 1 = 10
- basic variables with a R2 S2 0 2 3 0 1 0 0 18 18 / 3 = 6
R3 S3 0 1 0 0 0 1 0 8 -
value of zero are called R4 S4 0 0 1 0 0 0 1 6 6/1= 6
degenerate R0 Z 1 -3 0 0 0 0 4 24
R1 S1 0 1 0 1 0 0 -1 4
- continue the Simplex R2 S2 0 2 0 0 1 0 -3 0
R3 S3 0 1 0 0 0 1 0 8
procedure until R4 X2 0 0 1 0 0 0 1 6
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

coefficients of:
Row
basic var. Z x1 x2 S1 S2 S3 right side
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
Simplex Method – Particular cases
• Multiple optimal solutions:
When a NBV has a zero coefficient in coefficients of:
row 0, then we perform one more Row
basic var. Z x1 x2 S1 S2 S3 right side
iteration to identify the other optimal R0 Z 1 -3 -2 0 0 0 0
R1 X1 0 1 0 1 0 0 4
BF solution. 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
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.
Number of hours needed to produce each
Process Total number of product
hours available
A B C
I 12000 5 2 4
II 24000 4 5 6
III 18000 3 5 4
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?
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: Section Total Number of hours needed to produce each
number of model
hours luxury regular exportation
(thousands)

carpentry 1.4 0.5 0.5 1.0


finishing 1.2 0.5 0.5 2.0
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?
Simplex Method - exercises
• 3) Max: Z = x 1 + 2 x2 • 4) Max: Z = x1 + x 2
Subject to: Subject to:
2x1 + 4x2 ≤ 20 x1 + x 2 ≤ 4
x1 + x 2 ≤ 8 2 x1 + x 2 ≤ 6
and x1 x2 ≥ 0 x1 + 2 x 2 ≤ 6
and x 1 x2 ≥ 0
• 5) Max: Z = x1 + x 2
Subject to:
x1 + x2 ≤ 10
Apply the Simplex to find the optimal solution
2 x1 - 3 x2 ≤ 15
Multiple, unbound and degenerate solutions
x1 - 2 x2 ≤ 20
and x 1 x2 ≥ 0
Simplex Method - exercises
• 6) Min: Z = 2 x 1 - 3 x2 – 4 x 3 • 7) Max: Z = 10 x1 + 30 x2
Subject to: Subject to:
x1 + 5 x2 - 3 x3 ≤ 15 x1 ≤ 15
x1 + x2 + x3 ≤ 11 x1 - x2 ≤ 20
5 x1 – 6 x2 + x3 ≤ 4 -3 x1 + x2 ≤ -30
and x1 x2 x3 ≥ 0 and x1 ≥ 0 x2 ≤ 0

• 8) Max: Z = - x2
Subject to:
Bring the following PL problems to standard form and apply the
x1 + x2 + x3 ≤ 100 Simplex to find the optimal solution
x1 - 5 x2 ≤ 40
x3 ≥ -10
Minimization, negative RHS, negative and unbounded variables

and x1 ≥ 0 x2 ≤ 0 x3 unbounded
Simplex Method - exercises
• 9) Min: Z = 4 x1 + 2 x2 • 10) Max: Z = x1 + 2 x2
Subject to: 2 x1 - x2 ≥ 4 Subject to: x1 + x2 ≤ 10
x 1 + x2 ≥ 5 x 1 - 2 x2 ≥ 6
x1, x2 ≥ 0 x1, x2 ≥ 0

Bring the following PL problems to standard form introducing artificial


variables apply the big M method using Simplex to find the optimal
solutions

You might also like