Chapter 8 Simplex Method
Chapter 8 Simplex Method
Project Management
Chapter 8
Linear Programming Simplex Method
4th Stage
Fall Semester 2023 – 2024
Prof. Dr. Taleb Obaid
Simplex Method
THE SIMPLEX METHOD
1. Set up the problem. That is, write the objective function
and the inequality constraints.
2. Convert the inequalities into equations. This is done by
adding one slack variable for each inequality.
3. Construct the initial simplex tableau. Write the objective
function as the bottom/above row.
4. The most negative entry in the objective row identifies the
pivot column.
Prof. Dr. Taleb Obaid 2
Simplex Method
THE SIMPLEX METHOD … cont..
5. Calculate the quotients (RHS/Pivot column) ﺣﺎﺻﻞ اﻟﻘﺴﻤﺔ. The smallest
quotient identifies a row. The element in the intersection of the column
identified in step 4 and the row identified in this step is identified as
the pivot element. The quotients are computed by dividing the far right
column by the identified column in step 4. A quotient that is a zero, or a
negative number, or that has a zero in the denominator, is ignored.
6. Perform pivoting to make all other entries in this column zero. This is
done the same way as we did with the Gauss-Jordan method.
7. When there are no more negative entries in the objective row, we are
finished; otherwise, we start again from step 4
Solution
STEP 1. Set up the problem. Write the objective function and the constraints.
Maximize Z=40x1+30x2
Subject to:
x1+x2 ≤12
2x1+x2 ≤16
x1≥0; x2≥0
•Question Why do we choose the most negative entry in the bottom row?
•Answer The most negative entry in the bottom row represents the largest coefficient in
the objective function - the coefficient whose entry will increase the value of the objective
function the quickest.
Prof. Dr. Taleb Obaid 7
Simplex Method
STEP 5. Calculate the quotients.
The smallest quotient identifies a row. The element in the intersection
of the column identified in step 4 and the row identified in this step is
identified as the pivot element.
•Following the algorithm, in order to calculate the quotient, we divide
the entries in the far right column by the entries in column 1, excluding
the entry in the bottom row.
Pivot element
R2=R2/2
•To obtain a zero in the entry first above the pivot element, we
multiply the second row by -1 and add it to row 1. We get
R1=R1-R2
•To obtain a zero in the element below the pivot, we multiply the second row by
40 and add it to the last row.
R3=R3+R2(40)
R1=2*R1
Now to make all other entries as zeros in this column, we first multiply row 1 by
-1/2 and add it to row 2, and then multiply row 1 by 10 and add it to the bottom
row.
R1=R1
R2=R2-R1/2
R3=R3+R1*10 , x1=4, x2=8, z=400 (=40*4+30*8)
We no longer have negative entries in the bottom row, therefore we are finished
Prof. Dr. Taleb Obaid 14
Simplex Method
• When decision variables are more than 2, we always use Simplex Method
• Slack Variable: Variable added to a ≤ constraint to convert it to an equality
(=).
❑ A slack variable represents unused resources
Subject to
x1 , x2 ≥ 0
Step 1: Convert all the inequality constraints into equalities by the use
of slack variables. Let s1, s2 , s3 be three slack variables.
and rewriting the objective function such that all variables are on the
left-hand side of the equation. Model can rewritten as:
Subject to
x1 , x2 , s2 , s3 , s3 ≥ 0
One Feasible solution that satisfies all the constraints is: x1= 0, x2= 0,
s1=1500, s2 = 1575, s3 =420 and Z = 0.
A1 Z 1 13- 11- 0 0 0 0
B1 S1 0 4 5 1 0 0 1500 1500/4=375
C1 S2 0 5 3 0 1 0 1575 1575/5= 315
D1 S3 0 1 2 0 0 1 420 420/1= 420
Coefficients of
Basic
Row No C Sol
Variable
Z X1 X2 S1 S2 S3
B1 S1 0 4 5 1 0 0 1500 B1=B1-4*A1
=1575/5
C1=C1/5 S2 0 1 3/5 0 1/5 0
315
D1 S3 0 1 2 0 0 1 420 D1=D-1*A1
Coefficients of
Row Basic
Sol Ratio
No Variable
Z X1 X2 S1 S2 S3
D1 S3 0 0 1 0 75
Z 1 3- 5- 4- 0 0 0 0
S1 0 2 3 0 1 0 0 8 8/3
S2 0 0 2 5 0 1 0 10 5
S3 0 3 2 4 0 0 1 15 15/2
S. t.
3X1 – X2 + 3X3 ≤ 7
-2X1 + 4X2 ≤ 12
X1 , X 2 , X 3 ≥ 0
3X1 – X2 + 3X3 + S1 = 7
-2X1 + 4X2 + S2 = 12
X1 , X 2 , X 3 ≥ 0
Z’ 1 1 -3 2 0 0 0 0
S1 0 3 -1 3 1 0 0 7 -
S2 0 -2 4 0 0 1 0 12 3
S3 0 -4 3 8 0 0 1 10 10/3
Z’ 1 -1/2 0 2 0 3/4 0 9 4
S1 0 5/2 0 3 1 1/4 0 10
X2 0 -1/2 1 0 0 1/4 0 3
S3 0 -5/2 0 8 0 -3/4 1 1
S3 0 0 0 11 1 1 1 11
S.t.
X1 – X2 ≤ 1
-X1 + X2 ≤ 2
X1, X2 ≥ 0
Z - 3 X1 - 4 X2 = 0
S.t.
X1 – X 2 + S 1 = 1
-X1 + X2 + S2 = 2
X1, X2 , S1, S2 ≥ 0
Initial BFS is : X1=0, X2=0 , S1=1, S2=1 ≥ 0, and Z=0
Coefficients of
Basic
Sol Ratio
Variable
Z X1 X2 S1 S2
Z 1 3- 4- 0 0 0
S1 0 1 1- 1 0 1 -
S2 0 1- 1 0 1 2 2
Coefficients of
Basic
Sol Ratio
Variable
Z X1 X2 S1 S2
Z 1 7- 0 0 4 8
S1 0 0 0 1 1 3 -
X2 0 1- 1 0 1 2 -
X1 is the entering variable, but as in X1 column every no, is less than equal
to zero, ratio cannot be calculated. Therefore given problem is having a
unbounded solution
Prof. Dr. Taleb Obaid 44
Simplex Method
Graphically,
X2
Max Z = 3 X1 + 4 X2
S.t.
X1 – X2 ≤ 1
-X1 + X2 ≤ 2
X1, X2 ≥ 0 (0,2)
(0,1)
(0,-2) (0, -1) X1
(0, 0)