Linear Programing Simplex Method
Linear Programing Simplex Method
FIRST EDITION
2
CHAPTER 4: LINEAR
PROGRAMMING
3
3.1 Introduction and Requirements of Linear Programming (LP)
Problem
Mathematical modeling technique in which a linear function is maximized or minimized when
subjected to various constraints. This technique has been useful for guiding quantitative
decisions in business planning, in industrial engineering, and to a lesser extent. Linear
programming (LP) is a technique that helps in resource allocation decisions
A. Requirements of LP problem
4
B. Basic Assumptions of LP
5
Most common LP application: product mix problems.
Use LP to decide how much of each product to make, given a series of resource restrictions
GUIDED EXAMPLE 1
As a farmer, Zoul wants to determine the number of acres of land to be planted with mangos
and guavas. He has 80 acres of land and has allocated a capital of RM10,000 to develop the
land. The expenditures needed to plant mangos and guavas per acre are RM100 and RM150
respectively. The average yields per acre are 500 kg of mangos and 300kg of guavas.
The fruits are kept in the backyard store before they are sold. The store can only hold 6000kg
of fruits at one time. The net profit of each kg of mangos and guavas are RM0.60 and RM0.90
respectively.
Formulate the above problem as a linear programming model to maximize the net profit.
6
Solution:
7
HANDS-ON EXAMPLE 1
A company makes two products P and Q using two machines A and B. Each unit of P that is
produced requires 50 minutes processing time on machine A and 30 minutes processing time
on machine B. Each unit of Q that is produced requires 24 minutes processing time on
machine A and 33 minutes processing time on machine B. Machine A is going to be available
for 40 hours and machine B is available for 35 hours. The profit per unit of P is RM25 and the
profit per unit of Q is RM30. Company policy is to determine the production quantity of each
product in such a way as to maximize the total profit given that the available resources should
not be exceeded. Formulate the problem as a linear programming model.
HANDS-ON EXAMPLE 2
The Continuing Education Division of the UiTM Community College offers at most 30 courses
each semester. The courses offered are usually of two types: practical (such as woodworking,
wood processing and car maintenance) and humanistic (such as history, music, and fine arts).
To satisfy the demand of the community, at least 10 courses of each type must be offered
each semester. The division estimates that the profits of offering practical and humanistic
courses are approximately RM1500 and RM1000 per course, respectively. Formulate this
problem as a linear programming model.
8
Solution: Ans: Z 1500x 1000y , y 10 , y 10 , x y 30 x, y 0
9
A. Feasible Solution And Corner Point Method/Iso-Profit Line Method/Iso-Cost Line
Method
Any point in the region would be a feasible solution to the problem & any point outside the
shaded area would represent an infeasible solution
2 Optimal
3 Solution
Feasible
Region
Iso-Profit
1 Line 4
10
4) Iso-Cost (Objective) Line Method
Iso-Cost
Line
Optimal 2
Solution
3
11
o A factory wishes to maximize píofits given labouí and mateíials
constíaint toincrease the production of the bowls and mugs.
Maximization problem can be solved graphically by:
o Setting up the feasible solution region.
o Use either corner point method or iso-profit line method approach to find the values
of decision variables that yield the maximum profit.
GUIDED EXAMPLE 2
Maximize profit Z 3 X 7Y
Subject to constraints: 0.10 X 0.30Y 240
X 2Y 2000
X 800
X,Y 0
Solution:
Draw the lines/equations (convert the inequalities sign into the equal sign)
12
Constraint when X 0 Result Area Colour line/arrow
&Y 0
1. 0.10 X 0.30Y 240 0 240 True left/below green
2. X 2Y 2000 0 2000 True left/below blue
3. X 800 0 800 True right yellow
4. X 0 00 True right red
5. Y 0 00 True above purple
Note: The feasible region consists of all colours (green, blue, yellow, red and purple)
constraint on the graph.
Feasible
Region
13
Method 1: Corner Point Method
Step 1: Find the coordinates of each corner point that had been labeled 1, 2, 3, 4.
Feasible
Region
4
2
*Point 1: Solve the intersection point, given that X 800, then substitute into
0.10 X 0.30Y 240
0.10(800) 0.30Y 240 Y 533.33
Step 3: Select the corner point with the best (maximum/highest) value of the objective
function to maximize Z (profit)
Point 3
produces the highest profit of any corner point. Therefore, the value of X 1200
and Y 400 is the optimal solution. This solution yields a profit of RM6400 per production
period.
Step 4: Find the optimal solution based on the objective function to maximize Z (profit)
14
Method 2: Iso-Profit Line Method
The optimal solution is the point lying in the feasible region that produces the highest profit.
Step 1: Gives some small number of profits. For example, Z RM1470 is chosen (must be
in the feasible region).
Step 2:
Objective function: 1470 3 X 7Y
Calculate the objective function by replacing X 0 Y 210 0,210 and
Y 0 X 490 490,0
Feasible
Region
4
2
Step 3:
• Construct the line on the graph with points of 0,210 and 490,0 .
• If the line does not produce the highest possible profit, try graphing 2 more lines with higher
profit than before.
• Make sure that the iso-profit line must be parallel.
• Draw a series of parallel iso-profit lines until we find the highest iso-profit line, that is, the
one with the optimal solution.
• Therefore, the highest possible iso-profit line is the one that touches the tip of the feasible
region at the corner point (1200,400) 3 and yields a profit of RM6400 .
GUIDED EXAMPLE 3
From the solution of Guided Example 1, solve the following linear programming problem by
the graphical method.
15
X,Y 0
Solution:
3
1
By using the corner point method (method 1), to find the optimal solution:
2
Point produces the highest profit of any corner point.
16
HANDS-ON EXAMPLE 3
Solve the following linear programming problem using the graphical method.
Maximize Z 3X 2Y
Subject to:
2X 6Y 12
5 X 4Y 40
X 2Y 12
X,Y 0
17
HANDS-ON EXAMPLE 4
Maximize z 8x y
Subject to:
x y 40
2x y 60
x,y 0
18
2) Solving Minimization Problem
GUIDED EXAMPLE 4
Minimize C 12x 4y
Subject to:
x 4y 12
3x 2y 18
y 6
x, y 0
Solution:
Draw the lines/equations (convert the inequalities sign into the equal sign)
19
Find the feasible region: check the constraints at origin 0,0
20
Feasible Region
21
Method 1: Corner Point Method
Step 1: Find the coordinates of each corner point that had been labeled 1, 2 and 3.
Feasible Region
2
3
*Point 1: Solve the intersection point, given that Y 6, then substitute into
3x 2y 18
3x 2(6) 18 x 2
Step 3: Select the corner point with the best (minimum/lowest) value of the objective
function to minimize C (cost)
Point 1 produces the highest profit of any corner point. Therefore, the value of x 2
and y 6 is the optimal solution. This solution yields a cost of RM48 per production
period.
Step 4: Find the optimal solution based on the objective function to minimize C (cost)
22
Method 2: Iso-Profit Line Method
The optimal solution is the point lying in the feasible region that produces the lowest cost.
Step 1: Gives some largel number of costs. For example, C RM180 is chosen (must be
in the feasible region).
Step 2:
Objective function: 180 12x 4y
Calculate the objective function by replacing x 0 y 45 0,45 and
y 0 x 15 15,0
Feasible Region
2
Step 3:
• Construct the line on the graph with points of 0,45 and 15,0 .
• If the line does not produce the lowest possible cost, try graphing 2 more lines with lower
cost than before.
• Make sure that the iso-cost line must be parallel.
• Draw a series of parallel iso-cost lines until we find the lowest iso-cost line, that is, the one
with the optimal solution.
• Therefore, the lowest possible iso-cost line is the one that touches the bottom of the
feasible region at the corner point (2,6) 1 and yields a cost of RM 48 .
23
HANDS-ON EXAMPLE 5
Minimize cost C 6x 4y
Subject to:
xy 4
5x 3y 15
x, y 0
24
HANDS-ON EXAMPLE 6
25
C. Special Cases in LP
Infeasibility:
Unboundedness:
Redundancy:
Multiple solutions:
The optimal value of the objective function occurs at more than 1 extreme points, then the
problem has multiple optimal solution. For example: At corner point of (a,b) and (c,d ) , both
value of the objective function Z L (equal solution).
26
CHAPTER 5: SIMPLEX
METHOD
The Simplex method is an approach to solving linear programming models by hand using
slack variables, tableaus, and pivot variables to finding the optimal solution of an optimization
problem. The simplex method systematically examines corner points, using algebraic steps,
until an optimal solution is found.
⚫ Having more than two variables- too large for the simple graphical procedure.
⚫ Yields the optimal solution to the variables & the maximum profit or minimum cost.
⚫ The approach provides valuable economic information.
The procedure to solve a linear programming model using the Simplex method the following
steps are necessary:
Step 1: Set up the Problem in the Standard Form – Standard form is the baseline format
for all linear programs before solving for the optimal solution and has three
requirements:
1) must be a maximization problem,
2) all linear constraints must be in a less-than-or-equal-to inequality,
3) all variables are non-negative.
GUIDED EXAMPLE 5
From the solution of Guided Example 1, solve the following linear programming problem by
the graphical method.
Step 2: Determine Slack Variables – Slack variables are additional variables that are
introduced into the linear constraints of a linear program to transform them from
inequality constraints to equality constraints. This is done by adding one slack
variable for each inequality. Slack variables are needed in the constraints to transform
them into solvable equalities with one definite answer.
27
Maximize profit Z 0.60 X 0.90Y 0S1 0S2
28
Subject to : 100 X 150Y 1S1 0S2 10,000 (since 0S2 0 and 1S1 S1 )
500 X 300Y 0S1 1S2 6,000 (since 0S1 0 and 1S2 S2 )
X,Y,S1,S2 0
Step 3: Construct the Simplex Tableau - A Simplex tableau is used to perform row
operations on the linear programming model as well as to check a solution for
optimality. The tableau consists of the coefficient corresponding to the linear constraint
variables and the coefficients of the objective function.
Ci Z j 0.60 0.90 0 0
1. Determine which variable to enter the solution mix. Variable entering the solution has the
largest positive Ci Z j . This is the pivot column.
2. Determine the solution mix variable to be replaced. Variable leaving the solution mix is
determined by the ratio. The following are formula for ratio :
Ratio = Quantity [Right Hand Side (RHS)] / (corresponding number in pivot column)
The row with the smallest (nonnegative) ratio will be the pivot row (will be replace in the
next tableau). The intersection of the pivot row and pivot column is referred to as the pivot
number.
R
Q
=
P C
Pivot
Column Pivot
Pivot Row Number =
Ci Z j 0.60 0.90 0 0
29
3. Next, setup a new basic simplex tableau. Then, in the new table calculate the new values
for the pivot row. To do this, divide every number in the pivot row by the pivot number. This
row will become the reference row to compute the new values for each remaining row.
New row = (old row) – (corresponding number in the pivot column)(reference row)
*Reference row refer to the new value in pivot row that you have calculate in Step 3.
5. Lastly, calculate the value of Z j and Ci Zj this new tableau. If there are any Ci Zj
number greater than 0, return to step 1. If there are no Ci Zj numbers that are greater
than 0, an optimal solution has been reached.
Ci Z j 0.90 0 0 3/1000
Step 5: This is an optimum table since all values in Ci Zj row contains 0 and positive value.
Therefore, the company needs to plant 20 guavas to gain a maximum profit of RM18.
30
C. Solving Maximization Problems only
This concept also shows how the optimal solsution and the value of its objective function
change, given changes in various inputs to the problem.
GUIDED EXAMPLE 6
Given below is a linear programming model for two different types of can food sold in a
supermarket.
31
Solution:
a)
Ci Solution mix 2 3 0 0 0 Quantity
(basis) X Y S1 S2 S3
0 S1 1 3 1 0 0 180
0 S2 2 3 0 1 0 360
0 S3 1 1 0 0 1 100
Zj 0 0 0 0 0 0
Ci Z j 2 3 0 0 0
b) i.
Ci Solution mix 2 3 0 0 0 Quantity
(basis) X Y S1 S2 S3
3 Y 0 1 1 0 1 40
2 2
0 S2 0 0 1 1 3 120
2 2
2 X 1 0 1 0 3 60
2 2
Zj 2 3 1 0 3 240
2 2
Ci Z j 0 0 1 0 3
2 2
iv. It is not worthwhile to purchase since the additional cost of resource 3 is RM2.50
more than the shadow price resource 3(RM1.50).
GUIDED EXAMPLE 7
The linear programming model for the monthly production of x, y and z is given below:
a) Complete the optimal simplex tableau for the above problem as shown below:
32
Ci Solution mix 45 60 10 0 0 Quantity
(basis) x y z S1 S2
y 3 2 1
0 1 5 5 10 520
1 1 3
x 1 0 5 5 10 240
Zj
Ci Z j
Solution:
a)
Ci Solution mix 45 60 10 0 0 Quantity
(basis) x y z S1 S2
60 y 0 1
3 2 1 520
5 5 10
1 1 3
45 x 1 0 5 5 10 240
Zj 45 60 45 15
15 42,000
2
Ci Z j 15
0 0 -45 -15 2
b) x 520 y 240 s1 0, s2 0
Maximum profit = RM42,000
c) S1 and S2 are fully utilized
d) If one unit of item B is added, profit will increase by RM7.50
HANDS-ON EXAMPLE 7
Subject to:
3x1 12x2 6x3 600 (machine hour )
6x1 6x2 3x3 1200 (labour hr )
6x1 9x2 9x3 900 (components)
Where x1 , x2 and x3 represent units of products A, B and C.
a) Convert these constraints and the objective function to the proper form for the use in the
initial simplex tableau.
b) Set up the initial simplex tableau for this problem.
c) Below is a simplex tableau for the above problem.
33
Ci Solution mix 5 3 4 0 0 0 Quantity
(basis) x1 x2 x3 S1 S2 S3
0 S1 0 15/2 3/2 1 0 -1/2 150
0 S2 0 -3 -6 0 1 -1 300
5 x1 1 3/2 3/2 0 0 1/6 150
Zj
Ci Z j
Solution:
3x1 12x2 6x3 s1 600
Ans: 6x1 6x2 3x3 s2 1200 , 0 -9/2 -7/2 0 0 -5/6
6x1 9x2 9x3 s3 900
Yes, because all the entries for C j Z j row are 0,
Pr ofit RM750, x1 150, x2 x3 0,s1 150,s2 300,s3 0 ,
Resources that not fully utilize are machine hours of 150 hours and
labour hours of 300 hours. ( S1 150 and S2 300 ), increased by RM0.83
34
Ci Solution mix 5 3 4 0 0 0 Quantity
(basis) x1 x2 x3 S1 S2 S3
0 S1 0 15/2 3/2 1 0 -1/2 150
0 S2 0 -3 -6 0 1 -1 300
5 S3 1 3/2 3/2 0 0 1/6 150
Zj
Ci Z j
Slack Variable
Variables added to less than or equal to constraint in order to create an equality to generate
the initial solution. It represents a quantity of unused resource.
Surplus Variable
The difference between the total value of the true (decision) variables and the
number (usually, total resource available) on the right-hand side of the equation. Thus, a
surplus variable will always have a negative value.
Basic Solution
The feasible corner-point solutions to an LP are basic feasible solutions. The solution can be
easily read from the simplex tableau constructed. A basic solution is also called as the basis.
Basic Variable
Variables in the basis are the variables that are not set to zero and have non-zero values.
35
Non-Basic Variable
Variables that are set to zero when defining the corner points (solution) are known as non-
basic variables or variables that do not appear in the basis.
Artificial Variable
Variables to be include in each equality constraint to generate the initial solution. It has no
physical meaning and will be eliminated in the process (before the final tableau)
Unbounded Solution:
Unboundedness describes linear programs that do not have finite solution and occurs in
maximization problems. A variable can be indefinitely large without violating a constraint. The
condition of unboundedness will be discovered before reaching the final tableau that is when
trying to decide which variable to remove from the solution mix. The entire ratios turn out to
be negative or undefined.
Degeneracy:
Degeneracy occurs when a problem contains a redundant constraint that is one or more of
the constraints in the formulation make another unnecessary. Degeneracy arises when there
is a tie for the smallest ratio. It can lead the situation called cycling that is the algorithm puts a
new variable in, then takes it out in the next tableau, puts it back in, and so on. One simple
way of dealing with the issue is to select either row arbitrarily. If we are unlucky and cycling
does occur, we simply go back and select the other row.
GUIDED EXAMPLE 8
The optimal simplex tableau for the linear programming problem is given in the following table:
36
Solution:
Ci Solution 6 9 6 0 0 0 Quantity
mix X Y Z S1 S2 S3
(basis)
6 X 1 0 -0.5 1 -0.5 0 40
9 Y 0 1 1 -0.5 0.5 0 60
0 S3 0 0 -3 0.5 -1.5 1 40
Zj 6 9 6 1.5 1.5 0 780
Ci Z j 0 0 0 -1.5 -1.5 0
HANDS-ON EXAMPLE 8
Cj
Solution 150 130 250 0 0 0 0 0 Quantity
Mix X1 X2 X3 S1 S2 S3 S4 S5
0 S3 0 0 0 0.25 0.25 1 0 -0.5 56.25
150 X1 1 0 0 0 1 0 0 0 250
250 X3 0 0 1 -0.25 -0.25 0 0 0.5 143.75
0 S4 0 0 0 -0.25 -0.25 0 1 -0.5 243.75
130 X2 0 1 0 1 0 0 0 0 375
Zj 150 130 250 67.5 87.5 0 0 125 P
Cj-Zj 0 0 0 -67.5 -87.5 0 0 -125
a) What is the quantity of each product (X1, X2 and X3) that will be produced?
b) Determine the value of P.
c) Interpret the shadow price for each resource.
d) State the resource(s) that are not fully utilized and state how many units of each resource
have not been used.
e) Is there any alternative solution exists? Why?
Solution:
Ans: x1 250, x2 375, x3 143.75,P RM122,187.50 ,
R1 RM67.50,R2 87.50,R3 R4 0,R5 125
37
HANDS-ON EXAMPLE 8
A company produces two products ( x1 and x2 ) daily. Each product requires two resources
which are resource 1 ( S1 ) and resource 2 ( S2 ). The profits of producing each unit of x1 and
x2 are RM50 and RM80, respectively. The final simplex tableau for this linear programming
problem is shown in the following table:
38
Solution:
Ans: Ci Zj 0,0,17.5,5, x1 10, x2 5, profit 900
No alternative solution since Ci Zj is 0 for x1 and x2 .
Also x1 and x2 are in the solution
39
G. Dual in LP (Interpreting the final tableau)
• In linear programming, duality implies that each linear programming problem can be
analysed in two different ways but would have equivalent solutions. Any LP problem
(either maximization and minimization) can be stated in another equivalent form based on
the same data.
• Second way of stating the same problem
• LP primal involves maximizing a profit function subject to less than or equal (≤) to
resource constraints
• LP dual involves minimizing total opportunity cost subject to greater than or equal (≥) to
product profit constraints
40
GUIDED EXAMPLE 9
From the question of Guided Example 6, solve the following linear programming problem
below by write the dual for the linear programming model.
Solution:
Subject to: U 2V W 2
3U 3V W 3
U,V,W 0
GUIDED EXAMPLE 9
41
Solution:
a) Minimize cost C 1800U 2000V
subject to
U 4V 45
3U 2V 60
2U 2V 10
U ,V 0
HANDS-ON EXAMPLE 9
Citarasa Company produces three food paste products Rendang, Kuah Kacang and Masak
Lemak paste. Three resources required to produce the food paste product are cooking
machine time, inspection time, and paste ingredients. The manager has formulated the
problem as below.
Maximise, Z 18 X1 15 X 2 10 X 3
Ci Solution 18 15 10 0 0 0 Quantity
Mix X1 X2 X3 S1 S2 S3
S1 1 0 2 1 1 0
X2 2 1 1 0 1 0
S3 2 0 1 0 2 1
Zi
Cj Z j
42
Solution:
Ans: Minimise C 80U 40V 100W , U 2V 2W 18 ,
U V 2W 15 , 3U V W 10 , Ci Z j 12,0,5,0,15,0 ,
The solution is optimal as all the values in C j Z j row are non-positive.
X 2 40,S1 40,S3 20 , X1 X 3 S2 0 , total profit: RM600, RM15.00
Ci Solution 18 15 10 0 0 0 Quantity
Mix X1 X2 X3 S1 S2 S3
S1 1 0 2 1 1 0
X2 2 1 1 0 1 0
S3 2 0 1 0 2 1
Zi
Cj Z j
43
HANDS-ON EXAMPLE 10
Write the dual formulation for the below linear programming problem.
Maximize profit Z x 6y 8z
Subject to
x 2y 1200
2y z 1800
4x z 3600
x, y, z 0
44
CHAPTER 6:
TRANSPORTATION AND
ASSIGNMENT MODEL
45
4.1 Assignment Model
Assignment model is problem based on assigning task for object/people.
Using this method, the task is assign in order to maximize profit or minimize the cost.
Method that will be used to solve assignment model is Hungarian Method. This method
can ONLY be used for Minimization Problem.
If we encounter a maximization problem, the problem should be convert into minimization
problem before we can solve it using Hungarian Method.
Before using this step please check for balanced of this problem. Balanced problem means
Number Of Row = Number of Column
46
An Optimal solution can be found by assigning to:
a) Any zero which is unique to BOTH column and a row
b) Any zero which is unique to a column OR a row
c) Assignment which is not in (a) and (b)
GUIDED EXAMPLE 1
The manager of Motivation Training Agency has to assign four different facilitators to handle
four different programs. These facilitators would be paid at different rates per hour according
to their experience. The costs (RM) of assigning the facilitators are shown in the following
table. Advice the owner how to make the optimal assignment and calculate the minimum total
cost.
Facilitator Program
I II III IV
Abu 210 90 180 160
Bakar 100 70 130 200
Ishak 175 105 140 170
Musa 80 65 105 120
Solution:
Row = Column.
Therefore, it is balanced problem, we can proceed to use Hungarian Method.
Step 1:
Find the smallest number in a row
Row Substraction:
Substracting every number in a row by the smallest number such as 210 90 120...
120 65 55
Facilitator Program
I II III IV
Abu 120 0 90 70
Bakar 30 0 60 140
Ishak 70 0 35 65
Musa 15 0 40 55
47
Step 2:
Find the smallest number in a column from the row substraction
Facilitator Program
I II III IV
Abu 120 0 90 70
Bakar 30 0 60 140
Ishak 70 0 35 65
Musa 15 0 40 55
Smallest No in 15 0 35 55
Column
Column Substraction:
Substracting every number in a column by the smallest number such as 120 15 105...
55 55 0
Facilitator Program
I II III IV
Abu 105 0 55 15
Bakar 15 0 25 85
Ishak 55 0 0 10
Musa 0 0 5 0
Step 3:
Testing for optimal assignment
Facilitator Program
I II III IV
Abu 105 0 55 15
Bakar 15 0 25 85
Ishak 55 0 0 10
Musa 0 0 5 0
Step 4:
Revise the present table
Facilitator Program
I II III IV
Abu 105 0 55 15
Bakar 15 0 25 85
Ishak 55 0 0 10
Musa 0 0 5 0
48
New Revised Table :
Smallest Number NOT covered in line – other number not covered in line
Smallest Number NOT covered in line + intersection
The rest just copy from the previous table
Facilitator Program
I II III IV
Abu 90 0 40 0
Bakar 75 0 10 70
Ishak 55 0 0 10
Musa 0 0 5 0
Return to Step 3:
Testing for optimal assignment
Facilitator Program
I II III IV
Abu 90 0 40 0
Bakar 75 0 10 70
Ishak 55 0 0 10
Musa 0 0 5 0
Decision making:
Choose the program that contain cost 0 for each of the fasilitator.
Abu - Program II and Program IV
Bakar – Program II
Ishak – Program II and Program III
Musa – Program I, II and IV
Bakar – Program II
Since Bakar has been chosen for Program I delete all Program I in other fasilitator.
49
Now, calculate the minimum cost for the company :
*Refer to the original table to obtain the cost for each fasilitator based on the program.
Abu - Program IV - RM 160
Bakar – Program II - RM 70
Ishak – Program III - RM 140
Musa – Program I - RM 80
Total Minimum Cost = RM 450
GUIDED EXAMPLE 2
Ken is the owner of the Ken Electric Sdn Bhd. He receives 3 items to be repair that is blender,
microwave and toaster. Currently, he have 4 repair person that is Ahmad, Ben, Chan and
Khalid. This four repair persons have different talents and abilities. The cost of each person
repairing the item are differ based on their skill and speed. Advice Ken on how to make the
optimal assignment and calculate the minimum total cost.
Solution:
Row ≠ Column
Therefore add Column in order to balance the table
Cost for the dummy = 0
Worker Project
1 2 3 Dummy
Ahmad 11 14 6 0
Ben 8 10 11 0
Chan 9 12 7 0
Khalid 10 13 8 0
Row Subtraction
Worker Project
1 2 3 Dummy
Ahmad 3 4 0 0
Ben 0 0 5 0
Chan 1 2 1 0
Khalid 2 3 2 0
50
Column Subtraction :
Worker Project
1 2 3 Dummy
Ahmad 3 4 0 1
Ben 0 0 5 1
Chan 0 1 0 0
Khalid 1 2 1 0
Optimal solution:
Worker Project Cost
Ahmad 3 6
Ben 2 10
Chan 1 9
Khalid Dummy 0
Total RM25
GUIDED EXAMPLE 3
Four ship name Garuda, Angkasa, Tiong and Merbok have to ship goods to four different
sector that is A, B, C and D. Table below show a profit (RM ‘0000) the company will gain if he
ship the goods in time. Arrange the transportation of the goods in order for the company to
gain maximum profit and calculate the profit the company will gain.
Ship Sector
A B C D
Garuda 20 60 50 55
Angkasa 60 30 80 75
Tiong 80 100 90 80
Merbok 65 80 75 70
Solutin:
Ship Sector
A B C D
Garuda 80 40 50 45
Angkasa 40 70 80 25
Tiong 20 0 10 20
Merbok 35 20 25 30
51
Solve it using Hungarian Method
Row Substraction:
Ship Sector
A B C D
Garuda 40 0 10 5
Angkasa 15 45 55 0
Tiong 20 0 10 20
Merbok 15 0 5 10
Column Substraction:
Ship Sector
A B C D
Garuda 25 0 5 5
Angkasa 0 45 50 0
Tiong 5 0 5 20
Merbok 0 0 0 10
Test Optimality
Ship Sector
A B C D
Garuda 25 0 5 5
Angkasa 0 45 50 0
Tiong 5 0 5 20
Merbok 0 0 0 10
Optimal Solution
Ship Sector Answer Profit
Sector (RM ‘0000)
Garuda B, D D 55
Angkasa A, D A 60
Tiong B B 100
Merbok A, B, C C 75
Maximum Profit 290
HANDS-ON EXAMPLE 1
Tech Enterprise has four technicians to be assigned to repair four machines for their clients.
The four technician are paid hourly. Below are the wages of the four technician, the wages
are calculated based on their experience, skill and speed.
Technician Machine
A B C D
Ganesh 24 16 28 22
Chandran 20 18 20 16
Maxden 28 16 14 22
Danial 12 20 16 18
Find the optimal assignment that will minimize the total cost for the company to pay their
technician. What is the total hourly profit?
52
Solution: Ans: Ganesh - C, Chandran - B, Maxden - A, Danial - D,
Total Min Cost = RM 92)
53
HANDS-ON EXAMPLE 2
Frenz Marketing Research has four project leaders available for assignment to three clients.
Find the assignment of project leaders to clients that will minimize the total time to complete
all projects. The estimated project completion times in days are as follows:
54
HANDS-ON EXAMPLE 3
The Malaysian Royal Navy wishes to assign four warships to patrol four sectors of the
Malaysian Costal Areas on the lookout for illegal fishing activities and pirates. The relative
efficiencies of these four warships set by the commander are shown in the following table.
Find the optimal assignment to maximize efficiencies and calculate the total efficiencies.
Ship Sector
A B C D
1 90 65 95 40
2 70 60 80 75
3 85 40 80 60
4 55 80 65 55
55
4.2 Transportation Model
Transportation model are used to find the best way to distribution goods from several
points of supply (sources) to a number of points of demand (destinations).
A product is transported from a number of sources to a number of destinations at the
minimum possible cost (to minimize the cost).
Each source is able to supply a fixed number of units of the product and each destination
has a fixed demand for the product
All constraints are equalities in a balanced transportation model where supply equals to
demand.
Constraints contain inequalities in unbalanced models where supply does not equal to
demand
Solution steps:
Define problem
Set up transportation tableau
Develop initial solution using least cost method
Find optimal solution using MODI method (modified distribution)
There are 2 step involve in transportation model. The first one is developing Initial
solution and the second one is finding an optimal solution.
Before we start with the calculation, please make sure to always check whether the
problem is balanced or unbalanced problem.
Balanced problem meaning that number of supply = number of demand
56
GUIDED EXAMPLE 4
From/To A B C D Supply
X 28 18 32 36 300
Y 22 16 14 32 420
Z 32 24 20 36 600
Solution:
1. Choose the lowest cost available. That is 14. 14 is in row Y and column C. Now choose
that lowest value between number of supply row Y = 420 and number of demand in column
C = 360.
Therefore we will be choose 360. This means that the maximum value you can filled in is
360. Now since we already fill up the box of the lowest cost (14) with value of 360, all of
the column C have been filled. Means you cannot filled in other number. So write X to
indicidate that this column no longer available.
From/To A B C D Supply
X 28 18 32 36 300
X
Y 22 16 14 32 420
360
Z 32 24 20 36 600
X
Demand 280 200 360 480 1320
2. Choose the lowest cost from available box. The lowest cost now is 16. 16 located at row
Y with supply 420 and column B with demand 200. Now, choose the lowest number
between 420 and 200. 200 will be chosen. This means that the maximum value you can
filled in is 200. Before you fill the box with cost 16 with 200, take a look at the row. The
total supply for row Y is 420 but we already fill in the number of supply for the column C.
Therefore the calculation will be 420 – 360 = 60. Now, all row Y have been fulfilled.
From/To A B C D Supply
X 28 18 32 36 300
140 X
Y 22 16 14 32 420
X 60 360 X
Z 32 24 20 36 600
X X
Demand 280 200 360 480 1320
57
3. Next choose the lowest cost that left. We will choose 18. 18 is located in column B with
demand 200 and row X with supply 300. Now, choose the lowest number between 200
and 300. 200 will be chosen. This means that the maximum value you can filled in is 200.
Before you fill the box with cost 18 with 200, take a look at the column B. The total supply
for column B is 200 but we already fill in the number of supply for the row Y with 60.
Therefore the calculation will be 200 – 60 = 140. Now, all column B have been fulfilled.
From/To A B C D Supply
X 28 18 32 36 300
140 X
Y 22 16 14 32 420
X 60 360 X
Z 32 24 20 36 600
X X
Demand 280 200 360 480 1320
4. Next choose the lowest cost that left. We will choose 28. 28 is located in column A with
demand 280 and row X with supply 300. Now, choose the lowest number between 280
and 300. 280 will be chosen. This means that the maximum value you can filled in is 280.
Before you fill the box with cost 28 with 280, take a look at the row X. The total demand
for column is 280 but we already fill in the number demand for the column B with 140.
Therefore the calculation will be 300 – 140 = 160. We can choose the answer. Now, all
row X have been fulfilled.
From/To A B C D Supply
X 28 18 32 36 300
160 140 X X
Y 22 16 14 32 420
X 60 360 X
Z 32 24 20 36 600
X X
Demand 280 200 360 480 1320
5. Next choose the lowest cost that left. We will choose 32. 32 is located in column A with
demand 280 and row Z with supply 600. Now, choose the lowest number between 280
and 600. 280 will be chosen. This means that the maximum value you can filled in is 280.
Before you fill the box with cost 32 with 280, take a look at the row X. The total demand
for column A is 280 but we already fill in the number of demand for the column A with 280.
Therefore the calculation will be 280 – 160 = 120.
From/To A B C D Supply
X 28 18 32 36 300
160 140 X X
Y 22 16 14 32 420
X 60 360 X
Z 32 24 20 36 600
120 X X
Demand 280 200 360 480 1320
58
6. Now the only box that have not been filled is cost 36. Fill in the box with the remaining
supply.
600 – 120 = 480
From/To A B C D Supply
X 28 18 32 36 300
160 140 X X
Y 22 16 14 32 420
X 60 360 X
Z 32 24 20 36 600
120 X X 480
Demand 280 200 360 480 1320
Total Transportation = (160 x RM 28) + (140 x RM 18) + (60 x RM 16) + (360 x RM 14) +
(120 x RM 32) + (480 X RM 36)
= RM34,120.
i. The starting point is the northwest corner of the table with the maximum quantity
allocated to the cell.
ii. If the supply at each row is allocated fully, allocation is then moved to the next row. This
begins with the first row.
iii. Similarly, if the demand of each column is allocated fully, the demand is then moved to
the next column. Again, beginning with the first column
iv. Finally all the supplies and demands are ensured to be satisfied.
Solution:
From/To A B C D Supply
X 28 18 32 36 300
1
280 20
2
x x
Y 22 16 14 32 420
x 180
3 4
240 x
Z 32 24 20 36 600
x x 5
120 6
480
Demand 280 200 360 480 1320
Total Transportation = (280 x RM 28) + (20 x RM 18) + (180 x RM 16) + (240 x RM 14) +
(120 x RM 20) + (480 x RM 36)
= RM34,120.
59
C. Method III: Vogel’s Approximation Method (VAM) (For Minimization Problem)
i. Compute opportunity cost (difference between two lowest cost cell of the row/column)
for each row/column.
ii. Select the highest opportunity cost and assign maximum units to the lowest cost cell of
the row/column. Eliminate the row/column and recalculate the opportunity cost.
iii. Repeat step 1 and 2 until the table is fully filled.
Solution:
From/To A B C D Supply
X 28 18 32 36 300 1
10 4 8
X 200
1
x 100
5 36 536
Y 22 16 14 32 420 2 8 310
3
280 x x 6
140 32 32
Z 32 24 20 36 600 4 212 4
x x 360 2
2404 4
36 x
Demand 280 200 360 480 1320
66 6 xx 2xx x x 66xx x 44 4 4 4
** 1200, number 1 represent the first quantity been filled.
Total Transportation = (200 x RM 18) + (100 x RM 36) + (280 x RM 22) + (140 x RM 32) +
(360 x RM 20) + (240 x RM 36)
= RM 33 680.
60
Finding a better solution
1. Find the entering cell - the cell with the largest negative Improvement Index
2. Find the leaving cell.
a. Make a closed path for the entering cell. (this path must be as simple as possible)
• Start and end at the entering cell.
• Use vertical & horizontal line.
• Lines can change only at occupied cells – not all occupied cells have to be in the
closed path.
b. Place (+) & (-) sign alternately at each corner of the path. Start with the (+) sign at the
entering cell.
c. Choose the lowest number of units from cells containing (-) sign, say Q. This is the
leaving cell. (Do the same for maximization problem)
3. Set up a new table.
• Add Q to any cell with (+) sign and subtract Q to any cell with (-) sign.
4. Compute new improvement indices for this new solution to test either the solution is
optimal or not. Repeat all the process until the optimal solution is found.
From/To A B C Supply
1 6 8 10
150
2 7 11 11
175
3 4 5 12
275
Dummy 0 0 0
50
Demand 200 100 350 650
1 6 8 10 0
150
2 7 11 11 0
175
3 4 5 12 0
375
Demand 200 100 300 100 700
All steps applied in order to obtain optimal solution are same as previous
61
F. Alternative Optimal Solution
Multiple solutions are possible when one or more improvement indices in the optimal solution
stages equals zero. This means that it is possible to assign alternative transportation routes
with the same total transportation cost.
Notes: If there is 1 cell with Iij 0 , the problem has only one alternative solution. If there are
two cells with Iij 0 , the problem has two alternative solutions.
GUIDED EXAMPLE 5
G. Degeneracy
In a transportation tableau with m rows and n columns, there must be m + n - 1 cell with
allocations; if not, it is degenerate.
The tableau in the figure does not meet the condition since 3 + 3 -1 = 5 cells and there are
only 4 cells with allocations.
From/To A B C Supply
1 6 8 10
100 50 150
2 7 11 11
250 250
3 4 5 12
200 200
Demand 200 100 300 600
62
From/To A B C Supply
1 6 8 10
100 50 150
2 7 11 11
250 250
3 4 5 12
200 0 200
Demand 200 100 300 600
GUIDED EXAMPLE 6
Zamcomp Sdn. Bhd. produces one type of computer table at three factories located at different
towns. Factory I, II, and III can manufacture 300, 200, and 100 units respectively. These
computer tables are distributed to three major outlets, A, B and C. The demands from the
outlets are 200, 150 and 250 units respectively. The cost of producing one unit of computer
table varies due to different production technologies.
The production and distribution cost per unit (RM) from factories to outlets are as follows.
OUTLETS
FACTORY A B C
I 37 34 36
II 36 32 35
II 42 35 41
a) Set up a transportation tableau and determine the initial solution using LCM.
b) Is the initial solution from (a) optimal? Why?
c) Calculate the total production and distribution cost for the initial solution.
d) Solve the optimal solution, list the solution and calculate the minimum total production
and transportation cost.
e) Explain why there is an alternative optimal solution, find it and fill in the table below.
Solution:
From/To A B C Supply
I 37 34 36
100 X 200 300
II 36 32 35 200
X 150 50
III 42 35 41 100
100 X X
Demand 200 150 250 600
Total Transportation = (100 x RM 37) + (200 x RM 36) + (150 x RM 32) + (50 x RM 35)
(100 x RM 42)
= RM21,650
63
* check number of quantity that have been filled to make sure we did not encounter
degeneracy problem.
Row + Column – 1 = Number of box filled
3 + 3 -1 = 5 √ (not degeneracy problem)
From/To A B C Supply
= = =
I 37 34 36
= 100 1 200 300
II 36 32 35 200
��� = −�� 0 150 50
III 42 35 41 100
= 100 -3 0
Demand 200 150 250 600
�1 + �3 = 36 ��� = �� , ��� = ����, ��� = ����, ��� = −��, ��� = ��, ��� = ����
2 + 2 = 32
2 + 3 = 35
3 + 1 = 42
Then, solve index improvement for each of unused cell. Iij Cij Ri K j
��� = 34 − 0 − 33 = ��
���� = 36 − (−1) − 37 = ��
����� = 35 − 5 − 33 = −��
����� = 41 − 5 − 36 = ��
Since, one of the value of index improvement is not larger and equal to zero. Therefore it is
not optimal.
c) Total Transportation = (100 x RM 37) + (200 X RM 36) + (150 X RM 32) + (50 X RM 35)
(100 X RM 42)
= RM21,650
64
d) Finding a better solution.
From/To A B C Supply
= = =
I (+) 37 34 (-) 36
= 100 1 200 300
II 36 32 35 200
��� = −�� 0 150 (-) 50 (+)
III (-) 42 35 41 100
= 100 -3 (+) 0
Demand 200 150 250 600
Choose the most negative value for index improvement to be entering cell. Cell with -3 as
improvement index are chose.
Make a close path
Place (+) & (-) sign alternately at each corner of the path. Start with the (+) sign at the
entering cell.
Choose the lowest number of units from cells containing (-) sign, say Q. This is the leaving
cell. (Quantity = 100)
Set up a new table.
• Add Q to any cell with (+) sign and subtract Q to any cell with (-) sign.
From/To A B C Supply
I 37 34 36
200 100 300
II 36 32 35 200
50 150
III 42 35 41 100
100
Demand 200 150 250 600
From/To A B C Supply
= = =
I 37 34 36
= 200 1 100 300
II 36 32 35 200
��� = −�� 0 50 150
III 42 35 41 100
= 5 100 5
Demand 200 150 250 600
�1 + �3 = 36 ��� = �� , ��� = ����, ��� = ����, ��� = −��, ��� = ��, ��� = ����
2 + 2 = 32
2 + 3 = 35
3 + 2 = 33
65
Then, solve index improvement for each of unused cell. Iij Cij Ri K j
��� = 34 − 0 − 33 = ��
���� = 36 − (−1) − 37 = ��
����� = 42 − 0 − 37 = ��
����� = 41 − 0 − 36 = ��
Answer:
Transport from I to A = 200
Transport from I to C = 100
Transport from II to B = 50
Transport from II to C = 150
Transport from III to B = 100
Total Transportation = (200 x RM 37) + (100 X RM 36) + (50 X RM 32) + (150 X RM 35)
(100 X RM 35)
= RM21,350
e) Yes, it has alternative optimal solution because one of the improvement index is equal to
zero.
The method to find alternative optimal solution is the same as finding an optimal solution.
The different is we choose index improvement = 0 as our entering cell.
From/To A B C Supply
= = =
I (-) 37 34 (+) 36
= 200 1 100 300
II 36 32 (-) 35 200
��� = −�� 0 (+) 50 150
III 42 35 41 100
= 5 100 5
Demand 200 150 250 600
66
From/To A B C Supply
I 37 34 36
50 250 300
II 36 32 35 200
150 50
III 42 35 41 100
100
Demand 200 150 250 600
Answer:
Transport from I to A = 50
Transport from I to C = 250
Transport from II to A = 150
Transport from II to B = 50
Transport from III to B = 100
Total Transportation = (50 x RM 37) + (250 x RM 36) + (150 x RM 36) + (50 x RM 32)
(100 x RM 35)
= RM21,350
* the total transportation is the same as (d) but the transportation item from factory to
outlet is different.
The optimal solution to a maximization problem has been found when all improvement
indices are negative or zero.
If any index is +ve, the cell with the largest +ve improvement index is selected to be filled
using a MODI method.
This new solution evaluated and the process continues until there are no +ve improvement
indices.
GUIDED EXAMPLE 7
Refer to Guided-Example 6:
Calculate the total profit if the computer tables are sold at RM320 each of the outlets.
Solution:
From/To A B C Supply
I 283 286 284
100 X 200 300
II 284 288 285 200
X 150 50
III 278 285 279 100
100 X X
Demand 200 150 250 600
67
Total Transportation = (100 x RM 283) + (200 x RM 284) + (150 x RM 288) + (50 x RM 285)
(100 x RM 278)
= RM170,350
* check number of quantity that have been filled to make sure we did not encounter
degeneracy problem.
Row + Column – 1 = Number of box filled
3 + 3 – 1 = 5 √ (not degeneracy problem)
From/To A B C Supply
= = =
I 283 286 284
= 100 -1 200 300
II 284 288 285 200
= 0 150 50
III 278 285 279 100
��� = −�� 100 3 0
Demand 200 150 250 600
�1 + �3 = 284 ��� = �� , ��� = ������, ��� = ������, ��� = ��, ��� = −��, ��� = ������
2 + 2 = 288
2 + 3 = 285
3 + 1 = 278
Then, solve index improvement for each of unused cell. Iij Cij Ri K j
Since, one of the value of index improvement is larger and equal to zero. Therefore it is not
optimal.
68
Finding a better solution.
From/To A B C Supply
I (+) 283 286 (-) 284
100 -1 200 300
II 284 (-) 288 285 200
0 150 50 (+)
III (-) 278 (+) 285 279 100
100 3 0
Demand 200 150 250 600
Choose the most positive value for index improvement to be entering cell. Cell with 3 as
improvement index are chose.
Make a close path
Place (+) & (-) sign alternately at each corner of the path. Start with the (+) sign at the
entering cell.
Choose the lowest number of units from cells containing (-) sign, say Q. This is the leaving
cell. (Quantity = 100)
Set up a new table.
Add Q to any cell with (+) sign and subtract Q to any cell with (-) sign.
From/To A B C Supply
I 283 286 284
200 100 300
II 284 288 285 200
50 150
III 278 285 279 100
100
Demand 200 150 250 600
From/To A B C Supply
= = =
I 283 286 284
= 200 -1 100 300
II 284 288 285 200
= 0 50 150
III 278 285 279 100
��� = −�� -3 100 -3
Demand 200 150 250 600
�1 + �3 = 284 ��� = �� , ��� = ������, ��� = ������, ��� = ��, ��� = −��, ��� = ������
2 + 2 = 288
2 + 3 = 285
3 + 2 = 285
69
Then, solve index improvement for each of unused cell. Iij Cij Ri K j
Since, index improvement is not larger and equal to zero. Therefore it is optimal.
Answer:
Transport from I to A = 200
Transport from I to C = 100
Transport from II to B = 50
Transport from II to C = 150
Transport from III to B = 100
Total Transportation = (200 x RM 283) + (100 X RM 284) + (50 x RM 288) + (150 x RM 285)
(100 x RM 285)
= RM170,650
HANDS-ON EXAMPLE 4
A plywood producer manufactures plywood at three factories to meet the demand of three construction
sites. The factories are located at different locations. The production capacity at each factory
and the demand from each construction site are shown in the following tables:
The transportation cost (RM) per unit from each factory to each site is shown in the following
table:
Factory Site
P Q R
X 7 4 6
Y 6 2 5
Z 12 5 11
70
Solution: Ans: Total Cost = RM 3430, Total Cost=RM 3190,
Factory Z will have the surplus of 20 units
From/To P Q R Dummy Supply
X 7 4 6 0 300
70 230
Y 6 2 5 0 200
130 70
Z 12 5 11 0 100
80
Demand 200 150 230 20 600
71
72
HANDS-ON EXAMPLE 5
Sasuki Manufacturing Company has orders for three kinds of product manufactured in their
factory located in Pasir Gudang.
Three machines are available for the manufacturing operations. All three machines can
produce all the products at the same production rate. However, due to varying defect
percentages of each machine, the unit costs of products vary depending on the machine used.
Machine capacities for the next week, and the unit costs, are as follows:
a) Find the minimum-cost production schedule for the products and machines by using the
Stepping-Stone Method.
b) Is the solution unique? Explain.
Solution:
Ans: Total Min. Cost = RM15,500, the solution is unique
73
74
HANDS-ON EXAMPLE 6
Ceria Company manufactures tires in two factories XY and PQ and ships them to four
distribution centres in Johor Bahru, Penang, Petaling Jaya and Kuala Terengganu. The
following table shows the cost (RM) per unit, capacity and demand.
To Distribution Centre
Johor Bahru Penang Petaling Jaya Kuala Terengganu Capacity
From
XY 7 11 5 12 300
PQ 10 15 8 16 200
Demand 150 120 50 180
Solution:
Ans:
To Distribution Centre
Johor Bahru Penang Petaling Jaya Kuala Terengganu Capacit
From (K1=7) (K2=11) (K3=5) (K4=12)
XY 7 11 (120) 5 12 300
(R1=0) [0] (0)** (180)
PQ 10 15 8 16 200
(R2=3) (150) [1] (50) [1]
Demand 150 120 50 180 500
Total transportation=RM5380
75
76
77