Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views

CH 5 Linear Programming

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CH 5 Linear Programming

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

1.

Simplex Method

2. Dual Linear Programming

3. Transportation (Only minimization case: excluding


loop formation)

4. Assignment Model (Only minimization case)

www.studynotesnepal.com
1. The ways of Converting Inequalities into Equalities in Forms
Additional Variables
Types of and Coefficients
Additional Variables used in Subjective
Constraint used in the
Equations
s Objective Equations
Max Min

Less than or Equal to Salck varaibels are used i.e. S, for 1st equaoitn, S2 for 2nd equation and so 0 0
() and so.
Greater than Surpuls varaibels are used i.e. –S1 + A1 for 1st equaoitn, 0 for slack 0 for slack
or M for +M
Equal to () S2 + A2 for 2nd equaoitns and so on. artificial for
artificia
l
www.studynotesnepal.com
Equal to (=) +M
Example-1
Consider the following LPP,
Maximize: Z = 3x1 + 2x2 + 5x3
Subject to the constraints,
x1 + x2 + x3  9
2x1 + 3x2 + 5x3  30
2x1  x2  x3
 8 and x1, x2, x3  0
🞂​ Solution: Inequalities of the subjective equations can be converted into
equality in form adding slack variables such as:
Maximize (Z) = 3x1 + 2x2 + 5x3 + 0S1 + 0S2 + 0S3
Subjective to the constraints:
x1 + x2 + X3 + S1 + 0S2 +
0S3 = 9 2x1 + 3x2 + 5x3 + 0S1 + S2
+ 0S3 = 30
2x1  x2  x3 + 0S1 + 0S2 + S3 =
8

www.studynotesnepal.com
Simplex Table -
1
Cj 3 2 5 0 0 0
Ratio Column
B.V. Const. x1 x2 x3 S1 S2 S3

0 S1 9 1 1 1 1 0 0 9/1 = 9

0 S2 30 2 3 5 0 1 0 30/5 = 6 

0 S3 8 2 -1 -1 0 0 1 8/-1= -8

Zj 0 0 0 0 0 0 0

Zj -Cj - -3 -2 -5  0 0 0

www.studynotesnepal.com
Old R2
New R2  5 ; New R1  Old R1  New R2, New R3 
Old R3 + New R2
Simplex Table -
2
Cj 3 2 5 0 0 0
Ratio Column
B.V. Const x1 x2 x3 S1 S2 S3
.
0 S1 3 3/5 2/5 0 1 - 1/5 0 5 

5 X3 6 2/5 3/5 1 0 1/5 0 15

0 S3 14 12/5 -2/5 0 0 1/5 1 5.833

Zj 30 2 3 5 0 1 0

Zj -Cj - -1 1 0 0 1 0

www.studynotesnepal.com
5 2
R1 3 R1; R2  R2  R1; R3 
5
512 Simplex Table -
R3  R1
3
Cj 3 2 5 0 0 0
Ratio
B.V. Const x1 x2 x3 S1 S2 S3
Column
.

3 X1 5 1 2/3 0 5/3 -1/3 0

5 X3 4 0 11/25 1 -2/3 1/3 0

0 S3 2 0 -34/25 0 -4 1 1

Zj 35 3 21/5 5 5/3 2/3 0

Zj -Cj - 0 11/5 0 5/3 2/3 0


Since, all the values of Zj  C j are in positive (Zj  C j  0). It means solution is optimal and
required answers for the variables are:
Max (Z) = 35; x1 = 5; x3 = 4 and S3 = 2 and rest of the variables are zero.

www.studynotesnepal.com
Example 2
Solve the following problem by simplex
method Minimize (Z) = 3x1 + 2x2
Subject to the
constraints 2x1 +
4x2  10
4x1 + 2x2  10
x2  4
and x1, x2 
0 Solution
Inequalities of the subjective equations can be changed into equalities in forms adding
surplus variables to the constraint signs of greater than and equal to ().

Minimize (Z) = 3x1+ 2x2+ 0S1 + MA1 + 0S2 + MA2 + 0S3 + MA3
2xSubject
1 + 4x2 to  + A1 + 0S2 + 0A2 +
S1 constraints
the + 0A3 =
0S3 10
4x1 + 2x2 + 0S1 + 0A1  S2 + A2 + 0S3 + 0A3 = 10
0x1 + x2 + 0S1 + 0A1 + 0S2 + 0A2  S3 + A3 =4

www.studynotesnepal.com
Sm
i pelx
Cj 3 2Tabe
l 01 M 0 M 0 M
Rato
i
 BV
.. Const. x1 x2 S1 A1 S2 A 2 S3 A3 Cou
lmn

M A1 10 2 4 1 1 0 0 0 0 10/4 =
25. 
M A2 10 4 2 0
0 1 1 0 0 10/2 = 5
M A3 4 0 1 0 0 0 0 1 1 41/=4
Zj 24m 6m 7m m m m m m m
RZ1 j - 6m  3 7m  m 0 m 0 m 0
R1 4 Cj, R2  R2  2
2R1; R3 R3  R2

www.studynotesnepal.com
Sm
i pe
lx Tabe
l
Cj 3 22 0 M 0 M 0 M Rato
i
Cou
lmn
 B.V. Const. x1 x 2 S1 A1 S2 A 2 S3 A 3
2 x2 3/2 5/2 1 1/4 1/4 0 0 0 0 5
M A2 5 3 0 1/2 1/2 1 1 0 0 53/ 
M A3 3/2 1/4
1/2 0 1/4 0 0 1 1 3
Zj 13m 5m
2 3m 3m
+ +  + m m m m
5 1 1 1
2 2 4 4
2 2
RZ - m5 1 0 3m 7m
2 j   + m 0 m 0
R2  C; R11 R12  R2; 1
R3  Rj3 + R2 2 1
4 4
3 2
2 2 2

www.studynotesnepal.com
Sm
i pe
lx
Cj 3 2 0 Tabe
l M
3 0 M 0 M Rato
i
Cou
lmn
 B.V. Const. x1
x 2 S1 A1 S2 A2 S3 A 3
2 x2 5/3 0
1 1/3 1/3 1/6 1/6 0 0 5
3 x1 5/3 1
0 1/6 1/6 1/3 1/3 0 0 10
M A3 7/3 0
0 1/3 1/3 1/6 1/6 1 1 7
Z 7m + 3 2
m

m m m
+ m m
j + 
4 1 1 2 2
3 3 3 6 6
3 6 6 3 3
Zj - 1 0 0 m 2m m 5m m 0
1
Cj 1 36
1 2 2
3 1 6  3 6 6
R3  3R3; R1  R + 3 R , + 6 3
+3

R2  R2 
R3 www.studynotesnepal.com
Simplex Table
Cj 3 2 04 M 0 M 0 M Ratio
Cou
lmn
 B.V. Const. x1 x2 S1 A1 S2 A2 S3 A3
2 x2 4 0 1 0 0 0 0 1 1
3 x1 1/2 1 0 0 0 1/4 1/4 1/2 1/2
0 S1 7 0 0 1 1 1/2 1/2 3 3
Zj 9.5 3 2 0 0  3  1
3 4 1 4
4 4
3
Zj - 0 0 0 m  m+ 
4 1m +
Since, allCthe
j 3
values of Zj  Cj are in zero or negative (i.e. Zj 1 Cj 40). It means
4 4
optimum feasible solutions has been obtained. The required answers for the variables
are: 1
zj = 9.5, X2 = 4, x1 = 2 and
S1 = 7

www.studynotesnepal.com
Dual Linear
Programming
Write the d u a l of the fo llowi ng LP P :
Primal Equations Du a l Equations (Solution)
i. M a x i m i z e (Z) = 4X1 + 3X2 i. M i n i m i z e ( Z ) = 12 y 1 + 4 y 2 + 2 1 y 3
S u bje c t to th e li near constraints S u bje c t to th e li near constraints
2 X 1 + 3 X 2  12 2y1 + 2y2 + 3y3  4
2X1 + X2  4 3y1 + y 2 + 7y3  3 y1 ,
3 X 1 + 7 X 2  21 X 1 , y2 , y3  0
X2  0
ii. M i n i m i z e (Z) = 4X1 + 5X2 ii. M a x i m i z e ( Z ) = 2 y 1 + 6 y 2 + 15y3
S u bje c t to th e constraints S u bje c t to th e constraints
X1 + X2  2 y 1 + 2y2 + 3y3  4
2X1 + X2  6 y1 + y2 + 5y3  5 y1 ,
3 X 1 + 5 X 2  15 X 1 , y2 , y3  0
X 2 0
iii. M a x i m i z e ( Z) = 2 X 1 + 3X2 iii. M a x ( Z ) = 2 x1 + 3x2
Subject to linear constraints S u b j e c t to
X1 + X2  5 x1 + x2  5
2X1 + 3X1  6 X1 , 2x1  3x2  
X2  0 6 N o w,
M i n (Z) = 5y1  6y2
S u b j e c t to
y1  2y2  2
y1 
3y2  3 y1 ,
y2  0

www.studynotesnepal.com
Example 1
Find the optimal transportation schedule from following with the objective of minimizing
the cost. [T.U.
2058] Factory Quantity requirements per day in Ware Quantity available per day in
kg. house kg.
P 450 X 350
Q 500 Y 400
R 200 Z 400
Cost of transportation per kg is given in the following
table. To factory
From
P Q R
Warehouse X 10 20 20
Warehouse Y 40 60 40
Warehouse Z 10 16 24

www.studynotesnepal.com
Step 1. Getting an initial basic feasible solution by
VAM To P Q R Available Cost Difference
From I II Ri
350 x x 
X 350 – R1 = 0
10 x 20 20 10
100 100 200
Y 400 0 0 R2 = 30
40 60 40 x
400
Z 400 6 6 R3 = -
10 x 16 x 24 x
1150 14
Required 450 500 200
Cost difference I 0 4 4
II 30 44 16
Kj K1 = 10 K2 = 30 K3 = 10

www.studynotesnepal.com
Step 2: Initial transportation cost = 10 × 350 + 40 × 100 + 60 × 100 + 40 × 200 + 16 × 400 = Rs.
27900
Step 3. Test of degeneracy
No. of occupied cells = No. of rows + No. of columns 
1 or, 5=3+31
or, 5=5
It is the case of non degeneracy.
Step 4. Calculation of values of occupied cells.
Cij = Ri + Kj
Assuming
For cell (1, R
1)1 = 0, we generate
C11= R1 +other
K1 values for
10row
= 0 and
+ K1  K1 = 10
column using the above relation.
For cell (2, 1) C21= R2 + K1 40 = R2 + 10  R2 = 30
For cell (2, 2) C22= R2 + K2 60 = 30 + K2  K2 = 30
For cell (2, 3) C23= R2 + K3 40 = 30 + K3  K3 = 10
For cell (3, 2) C32= R3 + K2 16 = R3 + 30  R3 = -
14

www.studynotesnepal.com
Step 5. Calculation of values unoccupied
cells or further improvement test.
Δij = Cij – Ri – Kj

🞂  R1  K2 = 20  0  30 =
Δ12 = C12
🞂 10
🞂 Δ13 20 +
= C13  R31  K13 = 10  014
 10
 10 ==14
10
🞂
Δ31 = C31
 R3  K3 = 24 + 14  10 = 28

Δ =C
 Since,
33
above calculated total cost of Rs. 27,900 is not
33

optimal because 12 is in negative. Loop path should be


formulated to minimize above cost.

www.studynotesnepal.com
Example
2
Determine the minimum transportation cost from the following [T.U.
matrix. Stores 2061]
Warehouse P1 P2 P3 P4 Suppy
l
Cost per unit

W1 45 60 45 30 70
W2 35 15 35 35 60
W3 30 25 45 55 90
220
Demand 60 40 60 20 180
Solution
The given transportation problem is unbalanced as supply exceeds
demand by 220 180 = 40 units. So, we need to create a dummy store for
supplying excess units. The unit transportation cost will be taken as Rs. 0. The
balanced transportation will be as follows:
www.studynotesnepal.com
Step 1. Getting an initial basic feasible solution by
VAM. Stores
Row cost
Warehouse Supply
P1 P2 P3 P4 Dp difference

I II III IV

X X 10 20 40 70 30  15 15 
W1
45 60 45 30 0 10 30 15
X 40 20 X X 60 20 15   0
W2
35 15 35 35 0 20
W3
60 X 30 X X 90 30 25 5  10
30 25 45 55 0 15
Demand 60 40 60 40 10 20 40 220
I 5 10 10 5 0
Column II 5 10 10 5 –
cost III 5 – 10 5 –
difference IV – – 10 5 –

www.studynotesnepal.com
Step 2.
Initial transportation cost = 10 × 45 + 20 × 30 + 40 × 0 + 40 × 15 + 20 × 35 + 60 × 30 + 30 × 45
= 450 + 600 + 0 + 600 + 700 + 1800 + 1350 = Rs. 5500
Step 3. Test of degeneracy
Since, number of occupied cells = N o . of rows + N o . of columns  1
7= 3+ 51
This is the case of non-degeneracy.
Step 4. Testing the optimality condition
Step 4.1 Calculation of row values and column values for
occupied cells using the relation.
C i j = Ri + Kj
Let's assume R 1 = 0 as it has many occupied cells.
C 1 3 = R 1 + K 3  45 = 0 + K 3  K 3 = 45 C 1 4
= R 1 + K 4  30 = 0 + K 4  K 4 = 30 C 1 5
= R1 + K 5  0 = 0 + K 5  K 5 = 0
C 2 3 = R 2 + K 3  35 = R 2 + 45  R 2 = - 10 C 3 3
= R 3 + K 3  45 = R 3 + 45  R 3 = 0 C 3 1 =
R 3 + K 1  30 = 0 + K 1  K 1 = 30 C 2 2 =
R 2 + K 2  15 = -10 + K 2  K 2 = 25

www.studynotesnepal.com
Step 4.2 Calculation of improvement indices for unoccupied cells by using the
relation,
ji = Cij - (Ri + Kj)
Here, 11 = C11 – (R1 + K1) = 45 -
(0 + 30) = 15
12 = C12 – (R1 + K2) = 60 - (0 +
25) = 35
21 = C21 – (R2 + K1) = 35 - (-
10 + 30) = 15
24 = C24 – (R2 + K4) = 35 - (-
10 + 45) = 0
25 = C25 – (R2 + K5) = 0 - (- 10
+ 0) = 10
32 = C32 – (R3 + K2) = 25 - (0 +
25) = 0
34 = C34 – (R3 + K4) = 55 - (0 +
www.studynotesnepal.com
30) = 25
Example 1
The A B C Company has three jobs to be done on three machines. Each job must be done on one
and only one machine. The cost of each job on each machine is given in the following table.
Cost information
Jobs X Y Z
A 4 6 8
B 2 3 4
C 4 8 5

Give the job assignments, which will minimize cost. [T.U. 2059]
Solution
Step 1: Subtract the lowest element of each row from all the elements of corresponding row.
i.e. R 1 R 1 –4 R 2 R 2 –2 R 3 R 3 –4
Machines
Jobs
X Y Z
A 0 2 4
B 0 1 2
C 0 4 1

www.studynotesnepal.com
Step 2: Subtract the smallest elements of each column from all the elements of corresponding column.
i.e., C 2 C 2 –1 C 3 C 3 –1
Machines
Jobs
M1 M2 M3
A 0 1 3
B 0 0 1
C 0 3 0
Step 3: M i n i m u m nu mbe r s of lines to cover all zeros are three wh i c h is equal to nu mbe r of rows.
Therefore we need not further processing. The optimal solution h a s been obtained a n d presented
as below:
Machines
Jobs
M1 M2 M3
A 0 1 3
B 0 0 1
C 0 3 0
Step 4: Th e m i n i m u m cost is:
Job Machine Assignment Cost
A M1
Rs 4
B M2
Rs 3
C M3
Rs 5
Minimum assignment cost Rs 12

www.studynotesnepal.com
Example 2
Four children in a household were assigned three different household chores to be done.
The children are motivated to get pocket money for the job. Assign the jobs to the children in
such a way that their pocket money income is maximum. [T.U.
2062] Children Clean the house Wash clothes Cook dinner
Ram 1 4 5
Laxman 2 3 3
Bharat 3 3 3
Shatrughan 5 1 2

Solution
Step 1: First of all, we should make square matrix to given non square matrix for
solution. Therefore, we introduce dummy column to convert 4 × 4 square matrix.
Jobs
Children Clean house Wash clothes Cook dinner Dummy
Ram 1 4 5 0
Laxman 2 3 3 0
Bharat 3 3 3 0
Shatrughan 5 1 2 0

www.studynotesnepal.com
Step 2: Subtract all elements of initial matrix from the largest element 5 to convert the
given maximization problem to minimization problem.
Children Clean house Wash clothes Cook dinner Dummy
Ram 4 1 0 5
Laxman 3 2 2 5
Bharat 2 2 2 5
Shatrughan 0 4 3 5

Step 3: Subtracting the smallest elements of each row from all element of corresponding
row.
i.e. R2R2–2, R3R3–2,Clean house
Children Wash clothes Cook dinner Dummy
Ram 4 1 0 5
Laxman 1 0 0 3
Bharat 0 0 0 3
Shatrughan 0 4 3 5

Step 4: Subtracting the smallest elements of each column from all the elements of
corresponding column.
i.e. C4C4 – 3

www.studynotesnepal.com
Children Clean house Wash clothes Cook dinner Dummy
Ram 4 1 0 2
Laxman 1 0 0 0
Bharat 0 0 0 0
Shatrughan 0 4 3 2

Step 5: Here, there is at least one zero for each row and column. Now, we have to cross zeros.
Minimum number of lines to cover all zeros is equal to number of rows. Therefore, the optimal
solution has been obtained.
Children Clean House Wash clothes Cook dinner Dummy
Ram 4 1 0 2
Laxman 1 0 0 0
Bharat 0 0 0 0
Shatrughan 0 4 3 2

Step 6: Optimal Assignment


Children Job Income
Ram Cook dinner 5
Laxman D 0
Bharat Wash the cloth 3
Shatrughan Clean the house 5
Total Income Rs. 13

www.studynotesnepal.com

You might also like