3. linear programming senstivity analysis

21
ADVANCED OPERATIONS RESEARCH By: - Hakeem–Ur–Rehman IQTM–PU 1 R A O LINEAR PROGRAMMING : SENSITIVITY ANALYSIS

Upload: hakeem-ur-rehman

Post on 15-Apr-2017

801 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: 3. linear programming senstivity analysis

ADVANCED OPERATIONS

RESEARCH

By: -Hakeem–Ur–Rehman

IQTM–PU 1

RA OLINEAR PROGRAMMING : SENSITIVITY ANALYSIS

Page 2: 3. linear programming senstivity analysis

LINEAR PROGRAMMING: SENSITIVITY ANALYSIS

2

The term sensitivity analysis, sometimes also calledpost-optimality analysis, refers to an analysis of theeffect on the optimal solution of changes in theparameters of problem on the current optimal solution.

The following questions arise in connection with performing the sensitivity analysis.

1. How do changes made to the coefficients of the objectivefunction affect the optimal solution?

2. How do changes made to the constants on the right handside of the constraint affect the optimal solution?

Page 3: 3. linear programming senstivity analysis

EXAMPLE

3

XYZ manufacturing company has a division that produces two models ofgrates, model–A and model–B. To produce each model–A grate requires ‘3’ g.of cast iron and ‘6’ minutes of labor. To produce each model–B grate requires‘4’ g. of cast iron and ‘3’ minutes of labor. The profit for each model–A grateis Rs.2 and the profit for each model–B grate is Rs.1.50. One thousand g. ofcast iron and 20 hours of labor are available for grate production each day.Because of an excess inventory of model–A grates, Company’s manager hasdecided to limit the production of model–A grates to no more than 180 gratesper day.Solve the given LP problem and perform sensitivity analysis.

LP MODEL: Let X1 and X2 be the number of model–A and model–Bgrates respectively.The complete LP model is as follow:

Maximum: Z = 2X1 + 1.5X2 2X1 + (3/2)X2

Subject to:3X1 + 4X2 ≤ 10006X1 + 3X2 ≤ 1200X1 ≤ 180

X1, X2 ≥ 0

Page 4: 3. linear programming senstivity analysis

EXAMPLE (Cont…)

4

Contribution Per Unit Cj 2 3/2 0 0 0

CBi

Basic

Variables (B)

Quantity

(Qty)X1 X2 S1 S2 S3

0 S1 1000 3 4 1 0 0

0 S2 1200 6 3 0 1 0

0 S3 180 1 0 0 0 1

Total Profit (Zj) 0 0 0 0 0 0

Net Contribution (Cj – Zj) 2 3/2 0 0 0

0 S1 460 0 4 1 0 –3

0 S2 120 0 3 0 1 –6

2 X1 180 1 0 0 0 1

Total Profit (Zj) 360 2 0 0 0 2

Net Contribution (Cj – Zj) 0 3/2 0 0 –2

0 S1 300 0 0 1 –4/3 5

3/2 X2 40 0 1 0 1/3 –2

2 X1 180 1 0 0 0 1

Total Profit (Zj) 420 2 3/2 0 1/2 –1

Net Contribution (Cj – Zj) 0 0 0 –1/2 1

0 S3 60 0 0 1/5 –4/15 1

3/2 X2 160 0 1 2/5 –1/5 0

2 X1 120 1 0 –1/5 4/15 0

Total Profit (Zj) 480 2 3/2 1/5 7/30 0

Net Contribution (Cj – Zj) 0 0 –1/5 –7/30 0

Since all the values of (Cj – Zj) ≤ 0; so,the solution is optimal.

‘Z = 480; at ‘X1=120’ and ‘X2=160’. Thus, XYZ manufacturingcompany realizes a maximum profit of Rs.480 per day byproducing 120 model–A grates and 160 model–B grates per day.

Page 5: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS

5

The following questions arise in connection with performing thesensitivity analysis of the above problem.1. How do changes made to the coefficients of the objective

function affect the optimal solution?2. How do changes made to the constants on the right hand

side of the constraint affect the optimal solution?

CHANGE IN THE COEFFICIENTS OF THE OBJECTIVEFUNCTION:Now two questions are to be answered:1. How do changes made to the coefficients of non–basic

variable affect the optimal solution?2. How do changes made to the coefficients of basic variable

affect the optimal solution?

Page 6: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

6

How do changes made to the coefficients of non–basicvariable affect the optimal solution? According to the above optimal simplex table, S1, & S2 are

the non–basic variables. Now the question arises that how much have the

objective function coefficients to be changed before S1,& S2 would enter the solution and replaces one of thebasic variables (X1, X2 & S3)?

According to the simplex algorithm as long as the row(Cj – Zj) ≤ 0, there will not be any change in theoptimal solution. Thus, Cj – Zj ≤ 0 Cj ≤ Zj

Range for a non–basic variable:The range of ‘Cj’ values for non–basic variables are: “–∞ ≤ Cj ≤ Zj”. So,The range of values for ‘S1’ is: “–∞ ≤ Cj ≤ 1/5”The range of values for ‘S2’ is: “–∞ ≤ Cj ≤ 7/30”

Page 7: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…) How do changes made to the coefficients of basic variable affect the optimal

solution? According to the above optimal simplex table, X1, X2 & S3 are the basic variables.

Now the question arises that how much the objective function coefficient on a basicvariable can change without changing the optimal solution of an LP problem.

Change in the Coefficient of the Basic Variable ‘X1’:Let us denote the change in a variable value by ‘h’. The change in ‘X1’ is ‘2+h’. Now, we re–compute the new final simplex table which is as follows:

Contribution Per Unit Cj 2+h 3/2 0 0 0

CBi

Basic Variables

(B)

Quantity

(Qty)X1 X2 S1 S2 S3

0 S3 60 0 0 1/5 –4/15 1

3/2 X2 160 0 1 2/5 –1/5 0

2+h X1 120 1 0 –1/5 4/15 0

Total Profit (Zj) 480+120h 2+h 3/2 (1–h)/5 (7+8h)/30 0

Net Contribution (Cj – Zj) 0 0 – (1–h)/5 – (7+8h)/30 0

Since all the values in the (Cj – Zj ) ≤ 0, so the solution is optimal. The optimal solution will change if at leastone of (Cj – Zj ) > 0. We will find the value of ‘h’ for which the new solution remains optimal. In order to dothis, we evaluate ‘h’ in each column for the non–basic variables.

From ‘S1’ Column: (Cj – Zj ) ≤ 0 – (1–h)/5 ≤ 0 h ≤ 1It means that ‘S1’ will not enter the basis unless the profit per unit for ‘X1’ will increase to ‘2+h=2 +1 = 3’; if it goes above, the solution will not remain optimal.From ‘S2’ Column: (Cj – Zj ) ≤ 0 – (7+8h)/30≤ 0 h ≥ –(7/8)It means that ‘S2’ will not enter the basis unless the profit per unit for ‘X1’ will reduce to ‘2+h=2 – (7/8) = 9/8’; if it goes below, the solution will not remain optimal.

Page 8: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

8

How do changes made to the coefficients of basic variable affectthe optimal solution?

Range of Optimality for ‘X1’:Here, the value of ‘C1’ ranges from ‘(9/8) to 3’ (i.e. 1.125 ≤ C1 ≤ 3). In this interval of ‘C1’, theoptimality is unaffected. So, we conclude that the contribution to the profit of a model–A grate canassume values between Rs.1.125 and Rs.3 without changing the optimal solution.

Change in the Coefficient of the Basic Variable ‘X2’:Let us denote the change in a variable value by ‘k’. The change in ‘X2’ is ‘(3/2)+k’. Now, we re–compute the new final simplex table which is as follows:

Contribution Per Unit Cj 2 (3/2)+k 0 0 0

CBi

Basic Variables

(B)

Quantity

(Qty)X1 X2 S1 S2 S3

0 S3 60 0 0 1/5 –4/15 1

(3/2)+k X2 160 0 1 2/5 –1/5 0

2 X1 120 1 0 –1/5 4/15 0

Total Profit (Zj) 480+160k 2 (3/2)+k (1+2k)/5 (7–6k)/30 0

Net Contribution (Cj – Zj) 0 0 – (1+2k)/5 – (7–6k)/30 0

Since all the values in the (Cj – Zj ) ≤ 0, so the solution is optimal. The optimal solution willchange if at least one of (Cj – Zj ) > 0. We will find the value of ‘k’ for which the new solutionremains optimal. In order to do this, we evaluate ‘k’ in each column for the non–basic variables.

Page 9: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

9

How do changes made to the coefficients of basic variable affectthe optimal solution?

From ‘S1’ Column: (Cj – Zj ) ≤ 0 –(1+2k)/5 ≤ 0 k ≥ (–1/2)

It means that ‘S1’ will not enter the basis unless the profit per unit for ‘X2’ will decrease to‘(3/2)+k =(3/2)–(1/2)= 1’; if it goes below, the solution will not remain optimal.

From ‘S2’ Column: (Cj – Zj ) ≤ 0 – (7–6k)/30 ≤ 0 k ≤ 7/6

It means that ‘S2’ will not enter the basis unless the profit per unit for ‘X2’ will increase to‘(3/2)+k =(3/2) + (7/6)= 15/6’; if it goes above, the solution will not remain optimal.

Range of Optimality for ‘X2’:Here, the value of ‘C2’ ranges from ‘1 to 15/6’ (i.e. 1 ≤ C2 ≤ 2.5). In this interval of ‘C2’, theoptimality is unaffected. So, we conclude that the contribution to the profit of a model–Bgrate can assume values between Rs.1 and Rs.2.5 without changing the optimal solution.

Page 10: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

10

How do changes made to the coefficients of basic variable affectthe optimal solution?

Change in the Coefficient of the Basic Variable ‘S3’:Let us denote the change in a variable value by ‘L’. The change in ‘S3’ is ‘0+L’. Now, we re–compute the new final simplex table which is as follows:

Contribution Per Unit Cj 2 3/2 0 0 0+L

CBi

Basic Variables

(B)

Quantity

(Qty)X1 X2 S1 S2 S3

0+L S3 60 0 0 1/5 –4/15 1

3/2 X2 160 0 1 2/5 –1/5 0

2 X1 120 1 0 –1/5 4/15 0

Total Profit (Zj) 480+60L 2 3/2 (1+L)/5 (7–8L)/30 0+L

Net Contribution (Cj – Zj) 0 0 – (1+L)/5 – (7–8L)/30 0

Since all the values in the (Cj – Zj ) ≤ 0, so the solution is optimal. The optimal solution willchange if at least one of (Cj – Zj ) > 0. We will find the value of ‘L’ for which the new solutionremains optimal. In order to do this, we evaluate ‘L’ in each column for the non–basic variables.

Page 11: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

11

How do changes made to the coefficients of basic variable affectthe optimal solution?

From ‘S1’ Column: (Cj – Zj ) ≤ 0 –(1+L)/5 ≤ 0 L ≥ –1

It means that ‘S1’ will not enter the basis unless the profit per unit for ‘S3’ will decrease to ‘0+L=0–1= –1’; if it goes below, the solution will not remain optimal.

From ‘S2’ Column: (Cj – Zj ) ≤ 0 – (7–8L)/30 ≤ 0 L ≤ 7/8

It means that ‘S2’ will not enter the basis unless the profit per unit for ‘S3’ will increase to ‘0+L =0 + (7/8)= 7/8’; if it goes above, the solution will not remain optimal.

Range of Optimality for ‘S3’:Here, the value of ‘C5’ ranges from ‘–1 to 7/8’ (i.e. –1 ≤ C5 ≤ 0.875). In thisinterval of ‘C5’, the optimality is unaffected

Page 12: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

12

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

The LP problem is:Maximum: Z = 2X1 + 1.5X2 2X1 + (3/2)X2

Subject to:3X1 + 4X2 ≤ 10006X1 + 3X2 ≤ 1200X1 ≤ 180

X1, X2 ≥ 0

Contribution Per Unit Cj 2 3/2 0 0 0

CBi

Basic Variables

(B)

Quantity

(Qty)X1 X2 S1 S2 S3

0 S1 1000 +1h 3 4 1 0 0

0 S2 1200 + 0h 6 3 0 1 0

0 S3 180 + 0h 1 0 0 0 1

Total Profit (Zj) 0 0 0 0 0 0

Net Contribution (Cj – Zj) 2 3/2 0 0 0

Analyzing the 1st Constraint: Now, consideran ‘h’ increase in the right–hand side of the firstconstraint then the LP model constraintsbecome:

3X1 + 4X2 ≤ 1000 + 1h6X1 + 3X2 ≤ 1200 + 0hX1 ≤ 180 + 0h

Contribution Per Unit Cj 2 3/2 0 0 0

CBi Basic Variables (B)Quantity

(Qty)X1 X2 S1 S2 S3

0 S3 60+(h/5) 0 0 1/5 –4/15 1

3/2 X2 160+(2h/5) 0 1 2/5 –1/5 0

2 X1 120–(h/5) 1 0 –1/5 4/15 0

Total Profit (Zj) 480+(h/5) 2 3/2 1/5 7/30 0

Net Contribution (Cj – Zj) 0 0 – 1/5 – 7/30 0

Page 13: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

13

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

Remember that as the requirement of the simplex method is that the values in the quantitycolumn not be negative. If any value in the quantity column becomes negative then the currentsolution will no longer be feasible and a new variable will enter the solution.

Thus, the inequalities: 60+(h/5) ≥ 0, 160+(2h/5) ≥ 0 & 120–(h/5) ≥ 0 ; are solved for ‘h’: 60+(h/5) ≥ 0 (h/5) ≥ (–60) h ≥ –300; 160+(2h/5) ≥ 0 (2h/5) ≥ –160 h ≥ –400; 120–(h/5) ≥ 0 –(h/5) ≥ –120 h ≤ 600.

We will get: h ≥ –300, h ≥ –400 & h ≤ 600Since: b1 = 1000 + h then h = b1 – 1000;

The value ‘h = b1 – 1000’ is put into the inequalities h ≥ –300, h ≥ –400 & h ≤ 600as follows:

h ≥ –300

b1 – 1000 ≥ –300

b1 ≥ –300+1000

b1 ≥ 700

h ≥ –400

b1 – 1000 ≥ –400

b1 ≥ –400+1000

b1 ≥ 600

h ≤ 600

b1 – 1000 ≤ 600

b1 ≤ 600+1000

b1 ≤ 1600

Thus, the range of ‘b1’ is: 600 ≤ b1 ≤ 1600. Under these conditions, XYZManufacturing Company should produce ‘120–(h/5)’ model–A grates and‘160+(2h/5)’ model–B grates.

Page 14: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

14

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

The LP problem is:Maximum: Z = 2X1 + 1.5X2 2X1 + (3/2)X2

Subject to:3X1 + 4X2 ≤ 10006X1 + 3X2 ≤ 1200X1 ≤ 180

X1, X2 ≥ 0

Analyzing the 2nd Constraint:Now, consider a ‘k’ increase in the right–handside of the first constraint then the LP modelconstraints become:

3X1 + 4X2 ≤ 1000 + 0k6X1 + 3X2 ≤ 1200 + 1kX1 ≤ 180 + 0k

Contribution Per Unit Cj 2 3/2 0 0 0

CBi Basic Variables (B) Quantity (Qty) X1 X2 S1 S2 S3

0 S1 1000 +0k 3 4 1 0 0

0 S2 1200 + 1k 6 3 0 1 0

0 S3 180 + 0k 1 0 0 0 1

Total Profit (Zj) 0 0 0 0 0 0

Net Contribution (Cj – Zj) 2 3/2 0 0 0

Contribution Per Unit Cj 2 3/2 0 0 0

CBi Basic Variables (B) Quantity (Qty) X1 X2 S1 S2 S3

0 S3 60–(4k/15) 0 0 1/5 –4/15 1

3/2 X2 160–(k/5) 0 1 2/5 –1/5 0

2 X1 120+(4k/15) 1 0 –1/5 4/15 0

Total Profit (Zj) 480+(7k/30) 2 3/2 1/5 7/30 0

Net Contribution (Cj – Zj) 0 0 – 1/5 – 7/30 0

Page 15: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

15

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

Remember that as the requirement of the simplex method is that the values in the quantitycolumn not be negative. If any value in the quantity column becomes negative then the currentsolution will no longer be feasible and a new variable will enter the solution.

Thus, the inequalities: 60–(4k/15) ≥ 0, 160–(k/5) ≥ 0 & 120+(4k/15) ≥ 0; are solved for ‘k’: 60 – (4k/15) ≥ 0 –(4k/15) ≥ –60 k ≤ 225, 160–(k/5) ≥ 0 –(k/5) ≥ –160 k ≤ 800 & 120+(4k/15) ≥ 0 (4k/15) ≥ –120 k ≥ –450

We will get: k ≤ 225, k ≤ 800 & k ≥ –450.Since: b2 = 1200 + k then k = b2 – 1200;

The value ‘k = b2 – 1200’ is put into the inequalities k ≤ 225, k ≤ 800 & k ≥ –450 asfollows:

Thus, the range of ‘b2’ is: 750 ≤ b2 ≤ 2000. Under these conditions, XYZCompany should produce ‘120+(4k/15)’ model–A grates and ‘160–(k/5)’ model–Bgrates.

k ≤ 225

b2 – 1200 ≤ 225

b2 ≤ 225+1200

b2 ≤ 1425

k ≤ 800

b2 – 1200 ≤ 800

b2 ≤ 800+1200

b2 ≤ 2000

k ≥ –450

b2 – 1200 ≥ –450

b2 ≥ –450+1200

b2 ≥ 750

Page 16: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

16

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

The LP problem is:Maximum: Z = 2X1 + 1.5X2 2X1 + (3/2)X2

Subject to:3X1 + 4X2 ≤ 10006X1 + 3X2 ≤ 1200X1 ≤ 180

X1, X2 ≥ 0

Analyzing the 3rd Constraint:Now, consider an ‘L’ increase in the right–handside of the first constraint then the LP modelconstraints become:

3X1 + 4X2 ≤ 1000 + 0L6X1 + 3X2 ≤ 1200 + 0LX1 ≤ 180 + 1L

Contribution Per Unit Cj 2 3/2 0 0 0

CBi

Basic Variables

(B)

Quantity

(Qty)X1 X2 S1 S2 S3

0 S1 1000 + 0L 3 4 1 0 0

0 S2 1200 + 0L 6 3 0 1 0

0 S3 180 + 1L 1 0 0 0 1

Total Profit (Zj) 0 0 0 0 0 0

Net Contribution (Cj – Zj) 2 3/2 0 0 0

Contribution Per Unit Cj 2 3/2 0 0 0

CBi Basic Variables (B)Quantity

(Qty)X1 X2 S1 S2 S3

0 S3 60+L 0 0 1/5 –4/15 1

3/2 X2 160 0 1 2/5 –1/5 0

2 X1 120 1 0 –1/5 4/15 0

Total Profit (Zj) 480 2 3/2 1/5 7/30 0

Net Contribution (Cj – Zj) 0 0 – 1/5 – 7/30 0

Page 17: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

17

Change to the Constants on the Right–Hand side of the ConstraintInequalities:

Remember that as the requirement of the simplex method is that the values in the quantitycolumn not be negative. If any value in the quantity column becomes negative then the currentsolution will no longer be feasible and a new variable will enter the solution.

Thus, the inequalities: 60+L ≥ 0, 160 ≥ 0 & 120 ≥ 0; are solved for ‘L’: 60+L ≥ 0

L ≥ –60.We will get: L ≥ –60.

Since: b3 = 180 + L then L = b3 – 180;The value ‘L = b3 – 1200’ is put into the inequality L ≥ –60 as follows:L ≥ –60 b3 – 180 ≥ –60 b3 ≥ –60+180 b3 ≥ 120

Thus, the range of ‘b3’ is: 120 ≤ b3 ≤ ∞.

Page 18: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

18

Shadow Prices:

Shadow Price for 1st Resource:As we showed earlier that if the right hand side of constraint–1 is increasedby ‘h’ units then the optimal solution is: X1 = 120–(h/5) & X2 = 160+(2h/5).The resulting profit is calculated as follows:

Z = 2X1 + 1.5X2 = 2X1 + (3/2) X2

Z = (2) [120–(h/5)] + (3/2)[160+(2h/5)]Z = (480+h/5)

Now, let ‘h=1’, we find that Z = (480+(1/5))= 480.20.

As we know that the optimal value of the objective function of the originalproblem is Rs.480.20, so the shadow price for the 1st resource is 480.20–480= Rs. 0.20.

Page 19: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

19

Shadow Prices:

Shadow Price for 2nd Resource:As we showed earlier that if the right hand side of constraint–2 is increasedby ‘k’ units then the optimal solution is: X1 = ‘120+(4k/15)’ & X2 = ‘160–(k/5)’. The resulting profit is calculated as follows:

Z = 2X1 + 1.5X2 = 2X1 + (3/2) X2

Z = (2)[ 120+(4k/15)] +(3/2)[ 160–(k/5)]Z = 480+(7k/30)

Now, let ‘k=1’, we find that Z = [480+(7(1)/30]= 480.23.

As we know that the optimal value of the objective function of the originalproblem is Rs.480, so the shadow price for the 2nd resource is 480.23–480 =Rs.0.23.

Page 20: 3. linear programming senstivity analysis

LP:SENSITIVITY ANALYSIS (Cont…)

20

Shadow Prices:Shadow Price for 3rd Resource:As we showed earlier that if the right hand side of constraint–3 is increasedby ‘L’ units then the optimal solution is: X1 = ‘120’ & X2 = ‘160’.The resulting profit is calculated as follows:

Z = 2X1 + 1.5X2 = 2X1 + (3/2) X2

Z = (2)[120] +(3/2)[160]Z = 480

The shadow price for this resource is ‘Zero’.

There is a surplus (i.e., excess) of this resource. Due to the excess of thisresource constraint “X1 ≤ 180” is not binding on the optimal solution (X1=120& X2=160).

While, Constraint–1 and Constraint–2, which hold with equality at the optimalsolution (X1=120 & X2=160), are said to be binding constraints. The objectivefunction cannot be increased without increasing these resources. They havepositive shadow prices.

Page 21: 3. linear programming senstivity analysis

QUESTIONS

21