You are on page 1of 50

MAN231 OPERATION RESEARCH

Analisis sensitivitas
(Analisis postoptimal)
Josef H. Nudu,
josef@mail.uajy.ac.id ,
josef_nudu@yahoo.com
0815 7882 1971

2009

Sensitivity Analysis
Kondisi optimal yang diperoleh dari iterasi
didasarkan pada model dan kondisi saat model
dibuat.
Untuk itu perlu dilakukan langkah lanjutan untuk
mengetahui sensitivitas/ketangguhan solusi yang
diperoleh terhadap perubahan koefisien variabel
dan nilai kendala.
Karena itu, analisis lanjutan yang dilakukan
disebut analisis sensitivitas atau analisis
postoptimal (setelah kondisi optimal diperoleh).

Akibat yang mungkin terjadi


Perubahan koefisien fungsi objectif
Bisa merubah kondisi optimalitas

Perubahan nilai kendala


Perubahan RHS
Perubahan koefisien LHS
Bisa merubah fisibilitas

Penambahan kendala baru


Bisa merubah fisibilitas

Pengurangan kendala
Bisa merubah fisibilitas

Perhatikan bahwa untuk setiap tablo, bentuk yang


diperoleh adalah
Z

cBB-1A c

cBB1

cBB1b

xB

B-1A

B-1

B-1b

A = matrik kendala awal


B = matrik basis
Xn = matrik kolom
XB = matrik kolom basis
cB = matrik koefisien basis pada fungsi tujuan

b = matrik nilai kendala

In studying the sensitivity analysis, we should be


familiar with the lingo that is being used in LPP
situations. A general LPP is of the form
Maximize (or Minimize) z c1 x1 c2 x2 ... cn xn
subject to the constraints

a11 x1 a12 x2 ... a1n xn b1


a21 x1 a22 x2 ... a2 n xn b2
.
am1 x1 am 2 x2 ... amn xn bm
x1 , x2 ,..., xn 0

The RHS constants of the constraints, b1 , b2 ,..., bm


are referred to resources or availabilities of the
problem.
The objective coefficients, c1 , c2 ,..., cn
are referred to as unit profits (or unit costs).
The decision variables, x1 , x2 ,..., xn
are referred to as units of activities 1, 2, , n.

Dual Price of a constraint


This measure actually represents the unit worth
of a resource - that is it gives the contribution to
the objective function resulting from a unit
increase or decrease in the availability of a
resource. In terms of duality theory, the dual
price of a resource (=constraint) i, is precisely the
value of the optimal dual variable yi associated
with the constraint i. (Did you understand why it
is called dual price?). Other non-suggestive
names include shadow prices and simplex
multipliers.

Reduced cost of a variable xj (=activity j)


is defined as
Cost of consumed resources per unit of activity xj
- profit per unit of activity xj
= zj - c j

Changes affecting feasibility


The feasibility of the current optimum solution
may be affected only if
(1) The RHS of the constraints are changed
OR
(2) A new constraint is added to the model.
In both cases, infeasibility occurs when at least
one element of the RHS of the optimal tableau
becomes negative that is, one or more of the
current basic variables
become negative.

First we consider the changes in the optimal


solution due to changes in the RHS bi. We note
that the optimal solution is given by
1

xB B b
where b is the old RHS and B is the basic
matrix. Remember B-1 is found in the optimal
tableau below the entries which initially had an
identity submatrix.
1
The optimal value is given by z C B B b
When b is changed to b , the corresponding
new solution and new objective value are got by

replacing b with b .

10

Example 4.3-2 (Pages 135-136)


TOYCO assembles three types of toys: trains,
trucks and cars using three operations. The daily
limits on the available times for the three
operations are 430, 460, and 420 minutes
respectively. The profits per toy train, truck and
car are $3, $2, and $5 respectively. The assembly
times per train at the three operations are 1, 3, and
1 minute respectively. The corresponding times
per truck and per car are (2, 0, 4) and (1, 2, 0)
minutes respectively. A zero indicates that the
operation is not used.

11

Letting x1, x2, and x3 represent the daily number of


units assembled of trains, trucks and cars, the LPP
model is:
Maximize

z 3 x1 2 x2 5 x3

subject to

x1 2 x2 x3 430
3 x1

2 x3 460

x1 4 x2

420

x1 , x2 , x3 0
The optimal tableau is given in the next slide.
(Note: x4, x5, and x6 are slack variables there.)

12

Basic z
z
1

x1
4

x2
0

x3
0

x2

0 -1/4

x3
x6

0
0

0
0

1
0

3/2
2

x4
1

x5
2

x6
0

Sol
1350

1/2 -1/4

100

0
1

230
20

0
-2

1/2
1

This is the optimal tableau

13

Suppose that TOYCO wants to change


the capacities of the three operations
according to the following cases:

460

(a) 500
400

(b)

500

400

600

300 450
(c) 800 (d) 700


200 350

14

Use Sensitivity analysis to determine the optimal


solution in each case.
Solution: We note
1 / 2 1 / 4 0

1
C B 2 5 0 ; B 0
1 / 2 0
2
1
1
(b) New Solution is

x2
1 / 2 1 / 4 0
x B 1b 0 1 / 2 0
3

x6
2 1
1

500 150
400 200

600 0

15

Since this is feasible, it is optimal and the new


optimal value =

3 0 2 150 5 200 1300


(c) New Solution is

x2
1 / 2 1 / 4 0
x B 1b 0 1 / 2 0
3

x6
2
1
1

300
800

200

50

400
400

This is not feasible. So we apply dual simplex


method to restore feasibility. We note

new z = 3 0 2 50 5 400 1900

16

Basic z
z
1

x2
0

x3
0

x5
x3

0 -1/4
0 3/2
0
2
1
2
0
1
0
1

1
0
0
8
-4
2

0
1
0
0
0
1

x6

x2
x3
x6
z

x1
4

x4
1

x5
2

1/2 -1/4
0
1/2
-2
1
5
0
-2
1
1
0
0

x6
0

Sol
1900

0
0
1
0
0
0

-50
400
400
1500
200
300

200

This is the new optimal tableau.

17

Feasibility Range of the Elements of the RHS


Another way of looking at the effect of changing
the availabilities of the resources, bi, is to
determine the range for which the current
solution remains feasible.
For example if, in the TOYCO model, b2 is
changed to b2+D2= 460+D2, we want to find the
range of D2 so that the current solution remains
optimal.

18

When b2 is changed to b2+D2= 460+D2, the new


solution is

1 / 2 1 / 4 0
x2

x B 1b 0
1
/
2
0
3


2
x6
1
1

100
1 / 4 D2

230 1 / 2 D2
20

D2

430

460 D2
420

(current optimal
solution + D2 times the
2nd column of B-1.)

19

100 1 / 4 D2

230 1 / 2 D2

20 D2
is feasible if

100 1 / 4 D2 0 or D2 400
230 1 / 2 D2 0 or D2 460
20 D2 0

or D2 20

20 D2 400
Or
Thus current solution remains optimal if RHS of
the 2nd constraint lies between 440 and 860 (the

other RHSs being the same).

20

Problem 5

Problem Set 4.5B Page 151

HiDec produces two models of electronic gadgets


that use resistors, capacitors, and chips. The
following table summarizes the data of the situation:
Resource

Unit Resources Requirements


Model 1 Model2
Maximum Availability
(units)
(units)
(units)

Resistor

1200

Capacitor
Chips
Unit Profit($)

2
0
3

1
4
4

1000
800

21

Let x1, x2 be the amounts produced of Models 1 and


2 respectively. Then the above model becomes the
LPP
Maximize z 3 x1 4 x2
subject to

2 x1 3 x2 1200

(Resistors)

2 x1 x2 1000

(Capacitors)

4 x2 800

(Chips)

x1 , x2 0
Taking the slack variables as s1, s2, s3, the optimal

tableau is:

22

Basic z
z
1

x1
0

x2
0

s1 s2
5/4 1/4

s3
0

Sol
1750

x1

-1/4 3/4

450

s3
x2

0
0

0
0

0
1

-2
2
1/2 -1/2

1
0

400
100

This is the optimal tableau

23

(a) Determine the status of each resource


Answer: Since s1 = 0 = s2, the resistor and the
capacitor resources are scarce.
Since s3 > 0, the chips resource is abundant.
(b) In terms of the optimal profit, determine the
worth of one resistor, one capacitor and one chip.
Answer: They are respectively y1, y2, y3 the
dual optimal solution and hence are
5/4, 1/4, 0 respectively.

24

(c) Determine the range of applicability of the dual


prices for each resource.

Resistor: If D1 is the increase in the resource 1,


the new optimal solution is given by
x1
1 / 4 3 / 4 0 1200 D1

1000
s3 B 1b 2
2
1

x2
1 / 2 1 / 2 0
800
450
1 / 4 D1
400 2 D1
100
1 / 2 D1

0 gives 200 D1 200

25

Similar calculations show that, for a change D2 in


the capacitor, the range of feasibility is given by
200 D2 200
And for a change D3 in the chips, the range of
feasibility is given by D3 400
(d) If the available number of resistors is increased to
1300 units, find the new optimum solution.
The new solution is: Yes, as D1 = 100
25
425 This is feasible
450

x1

s 400
200 and hence

200
3

150 optimal.
x2
100

50

26
And
z = 1875.

(g) A new contractor is offering to sell HiDec


additional resistors at 40 cents each but only if
HiDec would purchase at least 500 units. Should
HiDec accept the offer?

27

Addition of a new constraint


The addition of a new constraint to an existing
model can lead to one of two cases:
1. The new constraint is redundant, meaning
that it is satisfied by the current optimal
solution and hence can be dropped
altogether from the model altogether.
2. The current solution violates the new
constraint in which case the dual simplex
method can be used
to recover feasibility.

28

We introduce this constraint in the final


simplex tableau as an additional row where the
usual additional (slack or surplus) variable is
taken as the basic variable for this new row.
Because this new row will probably have nonzero coefficients for some of the other basic
variables, the conversion to proper form for
Gaussian elimination is done and then
reoptimization is done in the usual way. The
following example illustrates this.

29

Example: Consider the LPP


Maximize z 2 x1 x2 x3
subject to 3 x1 x2 x3 60

x1 x2 2 x3 10
x1 x2 x3 20
x1 , x2 , x3 0
Applying the Simplex method, the optimal tableau is
given in the next slide. Now a new constraint
3x1 2 x2 x3 28 is added. Find the new optimal
solution.

30

Basic z
z
1

x1
0

x2
0

x3
3/2

s1
0

s2
3/2

s3
1/2

s4

0
1
0
0
3

0
0
1
0
-2

1
1/2
- 3/2
-7/2
1

1
0
0
0
0

-1
-2
1/2 1/2
- 1/2 1/2
- 5/2 -1/2
0
0

s4

0
0
0
0
0

s1
x1
x2

0
0
0

0
1
0

0
0
1

0
0
0

1
0
0

x3

s1
x1
x2

Sol
25

0
1
1

10
15
5
-7
28

3/7

22

- 12/7 -15/7 2/7


1/7 3/7 1/7
4/7 5/7 -3/7

8
14
8

3/7

5/7

2/7

1/7

-2/7

31

Changes affecting Optimality


1. Changes in the objective coefficients cj
The changes in the objective coefficients, cj , affect
"zj - cj" and hence the optimality. We recompute
the z-Row by replacing cj with c'j . We note that
CB will also change to C'B.
In the previous problem, we replace the objective
function with z 3 x 2 x 3 x .
1

Find the new optimal solution.

32

Thus c1 is changed from 2 to 3; c2 is changed


from -1 to -2; and c3 is changed from 1 to 3;
We note that in z-Row, the coefficients of basic
variables x1 , x2 , and x4 will remain zero now also.
We have only to calculate the new coefficients of
the non-basic variables only and the new z.
1

Coefficient of x3 = z3 c3 C B B A3 c3

1
3

0 3 2 1 / 2 3 0
2
3 / 2

33

Coefficient of x5 = z5 c5 C B B A5 c5

1
5

0 3 2 1 / 2 0 0
2
1 / 2
1

Coefficient of x6 = z6 c6 C B B A6 c6

2
1

0 3 2 1 / 2 0 0
2
1 / 2

34

Since all zj cj are 0, the current solution


remains optimal. Of course the new z is

3 15 2 5 3 0 35
If in the previous problem, we replace the objective
function with z 2 x1 3 x2 3 x3
You can verify that z6 c6 = -1/2 < 0. Thus
optimality is spoiled. By applying the regular
Simplex method, we can show that the new
optimum solution is x1 = 10, x2 = 0, x3 = 0 with

new z = 20.

35

Addition of a new activity


(= Changes in the coefficients of an existing
activity)
Suppose a new activity n+1 is added with
coefficients

cn 1
a

1,n 1

a2,n 1

am ,n 1

36

To find the effect of this on the current optimal


solution, we pretend this activity was present
initially with all coefficients zero. Hence the new
coefficients are calculated using the formulae:
In z-row, the coefficient of xn+1 is
1

z n 1 cn 1 C B B An 1 cn 1

And in the constraint matrix its coefficients are


1

B An 1
If zn+1 cn+1 satisfies the optimality condition, the
current solution is optimal. Else we apply regular

simplex method to restore


optimality.

37

The same procedure is adopted when the coefficients


of an existing variable are changed. If the variable ia
basic variable, we should see that the new tableau is
in proper form (i.e. coefficients of other basic
variables in that column should be made zero).

38

In the previous problem the coefficients of the (nonbasic) variable x3 are changed from
c3
a
13
a23

a33

1
1

to

c3
a
13
a23

a33

Using sensitivity analysis, find the new optimal


solution and value.
The only change in the optimal tableau will be the x3
column. We calculate the new x3 column and the

39
coefficient of x3 in the z-row.

We first note that

1 1 2

1 1
1
C B 0 2 1; B 0

2 2

0 1 1

2 2
1

Hence the new x3 column is B A3

1 2 3

1
1

0
1
2
2

1 2
0 1

2
2

6
1

2
3

40

New coefficient of x3 in z-row =


1

z3 c3 C B B A3 c3

6
1
2
2
3

3
0
2

Thus optimality is disturbed. We replace the x3


column in the original optimal tableau by the
new values and then find the new optimal
solution and optimal value by regular simplex

method.

41

Basic z
z
1

x1
0

x2
0

x3
-3/2

s1
0

s2
3/2

s3
1/2

Sol
25

-1
1/2
- 1/2

-2
1/2
1/2

10
15
5

5/4

55/2

s1
x1
x2

0
0
0

0
1
0

0
0
1

-1/2
-3/2

1
0
0

1/4

x3
x1
x2

0
0
0

0
1
0

0
0
1

1
0
0

1/6 - 1/6 -1/3


1/12 5/12 1/3
1/4 -3/4
0

5/3
95/6
15/2

42

In the previous problem a new variable x7 is


introduced with coefficients
c7
a
17
a27

a37

1
2

Using sensitivity analysis, find the new optimal


solution and value.
This is like the previous case. We assume the variable
x7 was already present with all coefficients 0.

43

We first note that

1 1 2

1 1
1
C B 0 2 1; B 0

2 2

0 1 1

2 2
1

Hence the new x7 column is B A7

1 2

1
1
0

2
2

1
0 1

2
2

2
1

7
3

2
1
2

44

New coefficient of x7 in z-row =


1

z7 c7 C B B A7 c7

7
3
1
(1)
2
1
2

7
0
2

Hence the original solution remains optimal


with the same objective value and it does not
help by introducing this new variable.

45

In the previous problem the coefficients of the (basic)


variable x1 are changed from
c1
a
11
a21

a31

2
3

1

1

to

c1
a
11
a21

a31

1
2

2

0

Using sensitivity analysis, find the new optimal


solution and value.
The only change in the optimal tableau will be the x1
column. We calculate the new x1 column and the

46
coefficient of x1 in the z-row.

We first note that

1 1 2

1 1
1
C B 0 2 1; B 0

2 2

0 1 1

2 2
1
B
A1
Hence the new x1 column is

1 2

1
1
0

2
2

1
0 1

2
2

2
2

0

0
1
1

47

New coefficient of x1 in z-row =


1

z1 c1 C B B A1 c1
0

1 1
1

We replace the x1 column in the original optimal


tableau by the new values.

48

Basic z
1
z
1

x1
0
2

x2
0
0

x3
1/2
3/2

s1
0
0

s2
1/2
3/2

s3
-1/2
1/2

Sol
-5
25

s1

-1

-2

10

x1
x2

0
0

1
-1

0
1

1/2
-3/2

0
0

1/2
- 1/2

1/2
1/2

15
5

-1

20

1/2

1/2

s1

-1

-1

50

x1
s3

0
0

1
0

-1/2
1

1
-1

0
0

1/2
0

0
1

5
20

49

Terima Kasih

50

You might also like