Linear Programming Model
Linear Programming Model
(IFM)
n
Subject to c
j1
ij x j bi for i 1, 2 ,..., m
xj 0 for j 1, 2,..., n
General form of LPP …
Objective function
Minimize , Z c1 x 1 c 2 x 2 ... c n x n
Subject to
a 11 x 1 a 12 x 2 ... a 1n x n b 1
a 21 x 1 a 22 x 2 ... a 2 n x n b 2
a m1 x 1 a m 2 x 2 ... a mn x n b m
n
Subject to
j1
c ij x j bi for i 1 , 2 ,..., m
xj 0 for i 1 , 2 ,..., n
Assumptions underlying Linear
Programming Model
• Linear programming model is based on the
assumptions of
1) Proportionality
2) Additively
3) Continuity
4) Certainty
5) Finite choices
Solution of Linear Programming
Model
• There two ways of solving the linear programming
model
a. Graphical method
b. Simplex method
Solving a Linear Programming by Graph ...
Steps
1. Plot the constraints on a Cartesian plane
2. Identify the feasible region (region satisfies all the
constraints) on the plotted graph.
3. Find the coordinates of the extreme points of the feasible
region
4. Determine the value of the objective function for each of the
extreme point of the feasible region
5. Determine the optimal solution for the problem
6. For maximization problem, the optimal solution
will be that corner point which provides the highest
value of the objective function
Maize 6 4 24
G’nuts 1 2 6
Profits ('000’) 5 4
1. Decision variable
Let X1 be the number of tons for feed type one
X2 be the number of tons for feed type two
Solution cont …
2. Objective function
Max (h) = 5X1+4X2
3. Constraints
6X1+ 4X2 ≤ 24
X1 + 2X2 ≤6
- X1 +X2 ≤ 1
X2 ≤ 2
X2 , X1 ≥ 0
Solution cont …
4. Linear programming model
Use intercept
X2 ≤ 2 here X2 = 2
Graph of Linear Programming
6
y 6
X1 X 2 1
X2 2
2 E D
F C
X1 2X2 6
-2 0
A
2
B
4 6 x
6 X1 4 X 2 24
Optimal Solution
Conner Max (h) = 5X1+4X2 h
Point
A(0,0) h= 5(0) + 4(0) 0
B(4,0) h= 5(4) + 4(0) 20
C(3, 1.5) h= 5(3) + 4(1.5) 21
D(2,2) h= 5(2) + 4(2) 18
E(1,2) h= 5(1) + 4(2) 13
F(0,1) h= 5(0) + 4(1) 4
Ludewa company should produce 3 tons of feed type 1
and 1.5 for feed type 2 in order to maximize the profit.
Example 2
• The final product of a firm has a requirement that
it must weight exactly 150kg. The two raw
materials used in manufacture this product are A
with a cost of Tshs 2 per units and B with a cost
of Tshs 8 per units. At least 14 units of B and no
more than 20 units of A must be used. Each unit
of A weighs 5kg and each unit of B weighs 10 kg.
How much each type of raw material should be
used for each unit of the final product if cost is to
be minimized?
Solution
Decision variable
X1= Number of units used for raw material A
X2= Number of units used for raw material B
Objective function
Minimize (h) = 2X1+8X2
Constraints
5X1+10X2 = 150
X1 ≤20
X2 ≥14
X1 ≥ 0
Multiple Optimal solution
• Multiple Optimal solution happens when a given linear
programming problem has more than one optimal
solution.
• Each of the multiple optimal would naturally yields the
same objective function value
• Example
Minimize (Z) = 8X1+16X2
Subject to X1+X2 ≤ 16
X2 ≤ 125
3X1+6X2 ≤ 900
X1 , X2 ≥0
Graph of Linear Programming
200
y 6 X1 2 X 2 200
150
X 2 125
E D
100
C
3 X 1 6 X 2 900
50
A B
-2 0 100 200 300 x
Optimal Solution
Conner Point Z = 8X1+16X2 z
A(0,0) Z = 8(0)+16(0) 0
B(0,125) Z = 8(0)+16(125) 2000
C(50, 125) Z = 8(50)+16(125) 2400
D(100,100) Z = 8(100)+16(100) 2400
E(200,0) Z = 8(200)+16(0) 1600
Point C and D clearly represent the optima.
Infeasibility
• Infeasibility is the possibility that the constraints may
be inconsistent so that there is no feasible solution to
the problem.
• Example
Minimize (Z) = 20X1+30X2
Subject to 2X1+X2 ≤ 40
4X1-X2 ≤ 20
X1 ≤ 900
X1 , X2 ≥0
Graph of Linear Programming
40
y 6 X1 2 X 2 200
20
X1 30
10
3 X 1 6 X 2 900
-2 0 10 20 30
• 10
x
Feasible region
Unboundedness
• For maximization type of the linear programming
problem, unboundedness occurs when there is no
constraint on the solution so that one or more of the
decision variables can be increased indefinitely without
violating any of the restrictions (constraints)
• An unbounded LPP occurs if it is possible to find points
in the feasible region with arbitrarily large Z- value (may
be profit or revenue)
• Example: Minimize (h) = 10X1+20X2
Subject to 2X1+4X2 ≥ 16
X1+5X2 ≥ 15
X1 , X2 ≥0
Graph of Linear Programming
8
y 6
X1 5 X 2 15
6
FEASIBLE
4
0 6 12 18 x
2 X 1 4 X 2 16
Simplex Method of Solving LPP
• Is a set of instructions which seek to examine
corner point in a methodical manner until the
best solution ensuring highest profit or lowest
cost under given constraints is obtained
Procedure to Develop the Simplex table
• 1st STEP: Change all constraints containing <, ≤,
>, ≥, into constraints containing =.
i. Constraints with <, ≤ are changed to constraints with =
sign by adding a slack variable.
e.g. 5X1+2X2 ≤ 22 will be 5X1+2X2 +S1 = 22
CB Basis X1 X2 S1 S2 S3 S4 RHS
0 S1 6 4 1 0 0 0 24
0 S2 1 2 0 1 0 0 6
0 S3 0 1 2 0 1 0 1
0 S4 0 0 1 0 0 1 2
Zj 0 0 0 0 0 0 0
Ci-Zj 5 4 0 0 0 0
Initial simplex table
Pivot Column
Cj 5 4 0 0 0 0
Pivot row
CB Basis X1 X2 S1 S2 S3 S4 RHS Ratio
0 S1 6 4 1 0 0 0 24 4
0 S2 1 2 0 1 0 0 6 6
0 S3 -1 1 2 0 1 0 1 -1
0 S4 0 0 1 0 0 1 2 ∞
Zj 0 0 0 0 0 0
Ci-Zj 5 4 0 0 0 0
Pivot element
2
nd
simplex table
Cj 5 4 0 0 0 0
CB Basis X1 X2 S1 S2 S3 S4 RHS
5 X1 1 2/3 1/6 0 0 0 4
0 S2 0 4/3 -1/6 1 0 0 2
0 S3 0 4/3 1/6 0 1 0 5
0 S4 0 1 0 0 0 1 2
Zj 5 5/2 5/6 0 0 0 20
Ci-Zj 0 3/2 -5/6 0 0 0
2nd
simplex table
Pivot column
Cj 5 4 0 0 0 0
Pivot row
5 X1 1 2/4 1/6 0 0 0 4 8
0 S2 0 4/3 -1/6 1 0 0 2 3/2
0 S3 0 4/3 1/6 0 1 0 5 20/3
0 S4 0 1 0 0 0 1 2 2
Zj 5 5/2 5/6 0 0 0 20
Ci-Zj 0 3/2 -5/6 0 0 0
Pivot element
3
nd
simplex table
Cj 5 4 0 0 0 0
CB Basis X1 X2 S1 S2 S3 S4 RHS
5 X1 1 0 1/4 -1/2 0 0 3
X2 , X 1 ≥ 0
Example cont…
• Simplex standard equation
Zj 0 0 0 0 0 0 0
Ci-Zj 40 24 0 0 M M
Initial simplex table
Pivot Column
Cj 40 24 0 0 M M
Pivot row
CB Basis X1 X2 S1 S2 A1 A2 RHS Ratio
M A1 20 50 -1 0 1 0 4,800 96
M A2 80 50 0 -1 0 1 7,200 144
Zj 0 0 0 0 0 0 0
Ci-Zj 40 24 0 0 M M
Pivot element
2nd Simplex table
Cj 40 24 0 0 M M
M A2 60 0 1 -1 -1 1 2,400 40
CB Basis X1 X2 S1 S2 A1 A2 RH Ratio
S
24 X2 0 1 -2/75 1/150 2/75 -1/150 80 3000
CB Basis X1 X2 S1 S2 A1 A2 RHS
0 S1 60 0 1 -1 -1 1 2400
Subject to X1 + 2X2 ≤ 12
4X1 - 2X2 ≥ 3
6X1 - X2 = 10
X1’ X2 ≥ 0
Solution
• Stating the dual variable
Minimize Z = 2X1 – 3X2
Subject to X1 +2X2 ≤ 12
4X1 - 2X2 ≥ 3
6X1 - X2 ≤ 10
6X1 - X2 ≥ 10
X1’ X2 ≥ 0
Solution
• Changing to canonical form
Minimize Z = 2X1 – 3X2
5Y1 + Y2+5Y3 ≥ 40
Y1,Y2,Y3 ≥ 0
Solution of dual problem
• We use simplex method to obtain the
dual solution
Sensitivity Analysis
Sensitivity Analysis
• Sensitivity Analysis is the procedure in linear
programming which involves investigate the status of
parameters of linear programming problem.
• These parameter are coefficients of objective
functions and constraints
• Two cases going to be discussed
1. Case One: change of objective function
Parameters
2. Case two: Changing the availability of recourses
affecting optimum solution
Sensitivity Analysis …
• Case One: Change of objective function Parameters
Z C1X 1 C 2 X 2
C 1X 1 Z
X 2
C2 C2
Case one: Change of Objective function
Parameters
y L1 6X1 4X2 24
L 2 X1 2 X 2 6
x
L 0 Z C1X1 C2X 2
Sensitivity Analysis …
• To what extend can we change
3
S L
1
2
1
S L
2
2
C
S L 1
0
C 2
Sensitivity Analysis …
• Means
3 C 1
1
2 C 2 2
3 C 1
1
2 C 2 2
1 C 3
i) 1
2 C 2 2
2 C
ii ) 2
2
3 C 1
Sensitivity Analysis …
• But, for C2=4 into (i)
Z 5X 1 4X 2
1 C 3
i) 1
2 C 2 2
1 C1 3
2 4 2
2 C1 6
Sensitivity Analysis …
• for C1= 5, into (ii)
2 C
ii ) 2
2
3 C 1
2 C 2
2
3 5
10
C 2 10
3
Case two: Changing the availability of recourses
affecting optimum solution
y
6X1 4X2 36
6X1 4X2 M1
L 2 X1 2 X 2 6
(2,2)
(6,0)
x
6X1 4X2 20
6X1 4X2 M2 6X1 4X2 24
Sensitivity Analysis …
• Fixing line L2
X 0 3
2
X 1 6 2
3X 1 2X 2 18
6X 1 4X 2 36
Sensitivity Analysis …
• .
X 2 6
2
X 1 2 4
6X 1 4X 2 20
20 M 1 36
Case two: Changing the availability of recourses
affecting optimum solution
X1 2X2 B
X1 2X2 6
X1 2X2 A
2,8 / 3
x
4,0
L1 6X1 4X2 24
Sensitivity Analysis …
• Fixing line L1
20 M 1 36
A M 2 B
X 0 1
2
X 1 4 2
Sensitivity Analysis …
X1 2X 2 4
A4
X 2 1
2
8 2
X 1
3
Sensitivity Analysis …
20
X 1 2X 2
3
20
B
3
60
4 6
3