You are on page 1of 11

ASSIGNMENT 2

Student name Shirin Alatrash Student number A00129

Academic year: 2020-2021 Semester Spring

Programme BSc in Industrial Engineering

Course title Operations Research I: Linear Models Course code NDSE 202
Assignment title Simplex Method

Programme
Instructor Name Dr. Mustafa Husain Dr. Raja Ghozi
leader
Distribution date: 18.03.2021 (Week 7) Submission date 03.04.2021 (Week 9)

Work Authenticity
I confirm that the work submitted for this assignment is authentic and my own.
I have referenced all sources wherever applicable.

Student signature: Date:

FOR INSTRUCTOR USE ONLY

Task Mark Instructor Feedback CLO PLO


1 10 10/10 A2
2 10 10/10 A2 PLO1

3 20 10/10 A2
4 30 30/30 B1 PLO6
5 30 27/30. Excellent explanation. However, you need to re-allocate resources B1 PLO7
according to your sensitivity analysis. For instance, only 30 Turbo computers
should be produced because the profit Z is not affected when making more
than 30. As an Operations Researcher, you need to present this important
information to top management.
Achieved mark 97/100 Outstanding

Course Learning Outcomes

A1. Demonstrate underpinning and advanced knowledge of operations research theories and applications.

A2. Develop linear programming models of operational problems.


B1. Solve operational problems using linear programming techniques.
Instructions to students:

1. Please write your name and number on front sheet.


2. Total number of pages for this assignment is 2 pages.

3. Please number the tasks clearly.


4. Referencing is compulsory. Any plagiarised work will be given a zero mark.

5. Please show your answers in a neat, readable form. Handwriting is acceptable.


6. Please scan your work preferably with a scanner and insert all scanned documents in this

document.
7. You may name your file as Assignment2_yourname.docx (e.g. Assignment2_MustafaHusain.docx).

8. Please upload all files to Canvas.

Assignment Brief

Purpose of this assessment: To measure your understanding of the simplex method.

Scenario
The period between 1947 to 1950 saw the first building of digital computers which coincided with the
publication of the simplex method in 1947 by George Dantzig. Since then, the simplex method has prevailed
as the best method for solving linear programming problems.

In this assignment, you are mainly required to demonstrate your understanding of the simplex method.
The operational problem of Dell Inc that was solved using the graphical method in Assignment 1 will be also
used in this assignment to appreciate the power of this method compared to the other methods. The standard
form of the mathematical model of this problem is

Maximize Z=100 x1+ 150 x2


Subject to x1 + 2 x2 ≤ 160
x1 ≤ 100
x2 ≤ 120
where
Z= total profit
x1=number of STANDARD computers
x2=number of TURBO computers

For the above operational problem, perform the following tasks:


Task 1: Convert the standard model to the matrix form.

The standard model that we have is:


Maximize Z=100 x1+ 150 x2
Subject to x1 + 2 x2 ≤ 160

Page 1 of 2
x1 ≤ 100
x2 ≤ 120

To convert this into matrix form we will use the coefficients from each equation and inequality that
we have and put it inside a matrix. We write the variables that we have also in square brackets above
each other starting with x 1. Then, we write the inequality that we have and finally the values that we
have after the inequality, in square brackets in matrix form as well. Therefore, the matrix form of this
operational problem will be:

Maximize [ 100 150 ] [ xx 12]


Subject to

12 160
[ ][ ] [ ]
10
01
x1
x2
≤ 100
120

[ xx 12] ≥ [ 00]

Task 2: Convert the standard model to the augmented form.

To convert the standard model to an augmented form, we need to convert our inequalities to equations
and we do that by adding slack variables. So, the first step would be is to add slack variables. For the
objective function we will get all the variables on one side of the equation and equate it to 0 as shown
below.

Maximize
o Z – 100X1 – 150X2 = 0

For the inequalities, we will remove the comparison operation and make it equal only to the number
on the right-hand side. To do this, we need to start adding the slack variables. We will add X3 to the
first one and X4 to the second one and X5 to the third one, as shown below.

Subject to

Page 2 of 2
o X1 + 2X2 + X3 = 160
o X1 +X4 = 100
o X2 + X5= 120

Finally, we have to mention that X1,2,3,4,5 are all equal to or bigger than 0, as shown below.
o Xj ≥ 0; Xj = (1, 2, 3, 4, 5)

Now, that we have turned everything to equations and added slack variables, we can do the last step
and convert it into an augmented form. To do that, we start with the equation number 0, and we place
all the variables that we have in that equation with its coefficient, and if a certain variable is not in the
equation, we give its coefficient as 0, and we do that for all the equations. Hence, the augmented form
is:

(0) 1Z – 100X1 – 150X2 + 0X3 + 0X4 + 0X5 = 0

(1) 0Z + 1X1 +2X2 + 1X3 + 0X4 + 0X5 = 160

(2) 0Z + 1X1 +0X2 + 0X3 + 1X4 + 0X5 = 100

(3) 0Z + 0X1 + 1X2 + 0X3 + 0X4 + 1X5 =120

Task 3: Convert the augmented form to the tabular form (Simplex Table).

To convert the augmented form to the tabular form, we need to create the tabular form table. In this
table we will write the basic variables, the equation number, the coefficients of each X that we have
from 1 to 5, and finally the right side of the equation. After we draw the table with the first row filled
with what was mentioned, we will write the columns starting with the basic variables Z, X3, X4, X5
and the number of equations from 0 to 3, and we will just fill the remainder of the table from the
coefficients that we have in our augmented form equations and similarly to the right-side column.
Therefore, the tabular form is:

Page 3 of 2
Basic Equation Coefficients of Right Side
Variable Z X1 X2 X3 X4 X5
Z (0) 1 -100 -150 0 0 0 0
X3 (1) 0 1 2 1 0 0 160
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 1 0 0 1 120

Task 4: Using the Simplex table created in Task 3, apply the simplex method to obtain an optimal solution. List
the steps to reach an optimal solution.

Since we have already created the tabular form table, we will use it to solve this problem using the
Simplex method. First of all, we will add the MTR column, which is the minimum test ratio column.
The first step that we should do now, is circle the column with the most negative coefficient in the 0
equation, which is -150, known as the pivot column. Now, we divide the right side by the non-zero
coefficients in pivot column and find the MTR. Therefore, we get the table below:

Equation Coefficients of Right Side MTR


Basic
Z X1 X2 X3 X4 X5
Variable
Z (0) 1 -100 -150 0 0 0 0
X3 (1) 0 1 2 1 0 0 160 160/2 = 80
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 1 0 0 1 120 120/1 = 120

Now, that we have added the MTR column and found the pivot column, we need to find the lowest
MTR, as we can see the lowest MTR is in equation 1, so we circle that row as well. Now, we realize
that X3 is leaving basic variables and X2 is entering so X2 should take the place of X3 and be (0,1,0,0).

Equation Coefficients of Right Side MTR


Basic
Z X1 X2 X3 X4 X5

Page 4 of 2
Variable
Z (0) 1 -100 -150 0 0 0 0
X3 (1) 0 1 2 1 0 0 160 160/2 = 80
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 1 0 0 1 120 120/1 = 120

Now, we know that X2 should take the values of X 3, we will divide equation 1 by 2, to make the value
in X2 1 instead of 2 in the first equation; therefore, we will get the following table:

Equation Coefficients of Right Side MTR


Basic Z X1 X2 X X4 X5
3
Variable
Z (0) 1 -100 -150 0 0 0 0
X3 (1) 0 ½ 1 ½ 0 0 80 160/2 = 80
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 1 0 0 1 120 120/1 = 120

Now, we will need to remove the -150 and make it 0 instead, we will do that by following this
equation
150Eq(1) + Eq(0), which means we will multiply equation 1 by 150 and add it to equation 0. The
table we will get will be as following:

Equation Coefficients of Right Side MTR


Basic Z X1 X2 X3 X4 X5

Variable
Z (0) 1 -25 0 75 0 0 12000
X3 (1) 0 ½ 1 ½ 0 0 80 160/2 = 80
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 1 0 0 1 120 120/1 = 120

Finally, the number in the coefficient of X 2 should be 0 in equation 3, so we will do that by following
this equation
-1Eq(1) + Eq(3), which means that we will multiply equation 1 by -1 and add that to equation 3. The
table we will get will be as following:

Page 5 of 2
Equati Coefficients of Right Side MTR
Basic on Z X1 X2 X3 X4 X5

Variable
Z (0) 1 -25 0 75 0 0 12000
X3 (1) 0 ½ 1 ½ 0 0 80
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 -1/2 0 -1/2 0 1 40

Now, we are done with X2 as it finally has the coefficients (0,1,0,0). We will have to repeat the same
exact process with the most negative value now, which is -25 of equation 0, known as the pivot
column, so we circle it. Now, we divide the right side by the non-zero coefficients in pivot column
and find the MTR. Now, since we found the lowest MTR will be 100 in equation 2 as negative
numbers are fixed. We will circle the lowest MTR row as well. 1 is the pivot coefficient as show
below:

Equation Coefficients of Right Side MTR


Basic Z X1 X2 X3 X4 X5

Variable
Z (0) 1 -25 0 75 0 0 12000
X3 (1) 0 ½ 1 ½ 0 0 80 80/0.5 = 160
X4 (2) 0 1 0 0 1 0 100 100/1 = 100
X5 (3) 0 -1/2 0 -1/2 0 1 40 40/0.5 = -80

Now, we realize that X4 is leaving the basic variables and X 1 is entering, which means that X1 should
take the values of X4 which are (0,0,1,0). So, we will have to go through a couple of equations to
make this happen. The first equation will be 25Eq(2) + Eq(0), which means we will multiply equation
2 by 25 and add that to equation 0. We will get the following table:
Equatio Coefficients of Right Side MTR
Basic n Z X1 X2 X3 X4 X5

Variable
Z (0) 1 0 0 75 25 0 14500

Page 6 of 2
X3 (1) 0 ½ 1 ½ 0 0 80 80/0.5 = 160
X4 (2) 0 1 0 0 1 0 100 100/1 = 100
X5 (3) 0 -1/2 0 -1/2 0 1 40

Now, we need to apply the second equation to let ½ be 0, which is -1/2Eq(2) + Eq(1), which means,
we will multiply equation 2 by -1/2 and add it to equation 1, we will get the following table:
Equat Coefficients of Right Side MTR
Basic ion Z X1 X2 X3 X4 X5

Variable
Z (0) 1 0 0 75 25 0 14500
X3 (1) 0 0 1 ½ -1/2 0 30
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 -1/2 0 -1/2 0 1 40

Finally, we will have to let the -1/2 in equation 3 to be 0, so we will us the following equation,
1/2Eq(2) + Eq(3), which means we will multiply equation 2 by ½ and add it to equation 3, we will get
the following table:
Equati Coefficients of Right Side MTR
Basic on Z X1 X2 X3 X4 X5
Variable
Z (0) 1 0 0 75 25 0 14500
X3 (1) 0 0 1 ½ -1/2 0 30
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 0 -1/2 ½ 1 90

Finally, we could see that we no longer have negative values in the objective equation, and the
columns of X1 and X2 both seem to be just like the basic variables; therefore, we hve concluded that
we reached an optimal solution as shown below:

Equati Coefficients of Right Side MTR


Basic on Z X1 X2 X3 X4 X5

Variable
Z (0) 1 0 0 75 25 0 14500
X3 (1) 0 0 1 ½ -1/2 0 30

Page 7 of 2
X4 (2) 0 1 0 0 1 0 100
X5 (3) 0 0 0 -1/2 ½ 1 90

So, the optimal solution is reached at X1 = 100 and X2 = 30. Therefore, Z = 14500.

Optimal at (100,30) and objective function Z = 14500.

Task 5:
- Use LINGO/LINDO or Excel Solver to obtain an optimal solution with the simplex method.

- Determine the allowable range of the model parameters.


- Show and discuss the results

For this task, I used Excel solver to solve this problem using the simplex method. The first step was to
formulate the linear programming model that was previously done in assignment one, and create the
table on Excel. The formulas used to find the hours consumed was the SUMPRODUCT.

Excel solver has showed us that the allowable range of the model parameters were 160 hours for line
1, 100 hours for line 2 and 30 hours for line 3 using Excel Solver Sensitivity report. In addition, the
solver showed us that the optimal solution was really at (100,30) and at Z=14500, X1=100, X2=30

Page 8 of 2
Finally, I decided to play with the constraints and see how that would affect the objective function, Z.
I have changed firstly the constraint of line 1 to 161, and I saw that Z changed to 14575, so that
means it had seen an effect of an increase. Then I changed line 1 to 159, and I noticed a decrease in Z
to 14425. Then I decided to change the constraint of line 2 to 101, only to see Z change to 14525,
which means it also increased. Then I changed line 2 constraint to 99 and noticed Z decrease to
14475. However, when I changed the constraint of line 3 to 121, I didn’t notice any changes in Z.
Moreover, even when I changed the constraint of line 3 to 119, I didn’t notice any change in Z. In
conclusion, I think that for every unit decrease in line 1, Z will decrease by 75, for every 1 unit
increase in line 1, Z will increase by 75. Moreover, for every unit decrease in line 2, Z will decrease
by 25, for every 1 unit increase in line 2, Z will increase by 25. However, no change in line 3 would
cause Z to change.

Guidance/notes to trainees

For Task 4, using MS Power Point to solve the problem with the simplex method in tabular form might be very
helpful to reduce mistakes in calculations.
For Task 5, you need to upload the LINGO/LINDO/EXCEL file to Canvas along with the docx file.

References:
[1] https://www.matem.unam.mx/~omar/math340/std-form.html
[2] https://courses.lumenlearning.com/sanjacinto-finitemath1/chapter/reading-solving-standard-maximization-
problems-using-the-simplex-method/
[3] https://math.libretexts.org/Bookshelves/Applied_Mathematics/Applied_Finite_Mathematics_(Sekhon_and_Bloo
m)/04%3A_Linear_Programming_The_Simplex_Method/4.02%3A_Maximization_By_The_Simplex_Method
[4] Lecture slides
[5] Excel Solver

Page 9 of 2

You might also like