Anda di halaman 1dari 9

13/11/2013

1
PENELITIAN OPERASIONAL I
(TIN 4109)
Lecture 8

LINEAR PROGRAMMING

Lecture 8
Outline:
Duality
Analisa Sensitivitas


References:
Frederick Hillier and Gerald J. Lieberman. Introduction
to Operations Research. 7th ed. The McGraw-Hill
Companies, Inc, 2001.
Hamdy A. Taha. Operations Research: An Introduction.
8th Edition. Prentice-Hall, Inc, 2007.
DUALITAS
Hubungan PRIMAL DUAL
Bila x adalah feasible terhadap PRIMAL dan y feasible
terhadap DUAL, maka cx s yb

Nilai objektif problem Max s Nilai objektif problem
Min

DUAL Constraint y A > c
x > 0 y Ax > cx
Ax s b y b > cx

Teorema Dualitas
Bila x
*
adalah penyelesaian dari PRIMAL dan y
*
adalah
penyelesaian dari DUAL, maka cx
*
= y
*
b
Bila x
0
feasible terhadap PRIMAL dan y
0
feasible
terhadap DUAL sedemikian hingga cx
0
= y
0
b, maka x
0

dan y
0
adalah penyelesaian optimal
Menyelesaikan
PRIMAL
Menyelesaikan
DUAL
z
DUAL FR
PRIMAL FR
Optimal
(PRIMAL DUAL FEASIBLE)
13/11/2013
2
Teorema Dualitas
1. P optimal D optimal
2. P tak terbatas
D tak terbatas


D tidak feasible
P tidak feasible
3. P tidak feasible
D tidak feasible


D tak terbatas/tidak feasible
P tak terbatas/tidak feasible
Both Primal and Dual Infeasible.
,
,
Dual Certificate
Someone tells us x
*
is an optimal solution.
Do we trust them?
Check if x
*
is feasible?
How to check if it is optimal?
Dual Certificates
Given x

(Claimed to be primal optimal solution)
and
Given y (Claimed to be dual optimal solution).
We can use both to convince ourselves.

1. Check feasibility of x using primal problem
2. Form dual problem and check feasibility of y
3. Check that primal objective value is equal to dual
objective value.
Complementary Variable Pairs
Primal
Decision
Variables
Dual Slack
Variables
Primal
Slack
Variables
Dual Decision
Variables
Contoh
0 ,
1
8 3 2
Subject to
3 Max
2 1
2 1
2 1
2 1
>
s +
s +
+
x x
x x
x x
x x
0 , , ,
1
8 3 2
Subject to
3 Max
4 3 2 1
4 2 1
3 2 1
2 1
>
= + +
= + +
+
x x x x
x x x
x x x
x x
z x
1
x
2
x
3
x
4
RHS
z 1 -1 -3 0 0 0
x
3 0 2 3 1 0 8
x
4 0 -1 1 0 1 1
z 1 -4 0 0 3 3
x
3 0 5 0 1 -3 5
x
2 0 -1 1 0 1 1
z 1 0 0 0.8 0.6 7
x
1 0 1 0 0.2 -0.6 1
x
2 0 0 1 0.2 0.4 2
13/11/2013
3
Pada Problem Dual
Hubungan Primal - Dual
Primal



Dual
z x
1
x
2
x
3
x
4
RHS
z 1 -1 -3 0 0 0
x
3 0 2 3 1 0 8
x
4 0 -1 1 0 1 1
z 1 -4 0 0 3 3
x
3 0 5 0 1 -3 5
x
2 0 -1 1 0 1 1
z 1 0 0 0.8 0.6 7
x
1 0 1 0 0.2 -0.6 1
x
2 0 0 1 0.2 0.4 2
ANALISA SENSITIVITAS
Shadow Price
It is often important for managers to determine how a
change in a constraints right-hand side changes the
LPs optimal z-value.
With this in mind, we dene the shadow price for the
i
th
constraint of an LP to be the amount by which the
optimal z-value is improvedincreased in a max
problem and decreased in a min problemif the right-
hand side of the i
th
constraint is increased by 1.
This denition applies only if the change in the right-
hand side of Constraint i leaves the current basis
optimal.
Diet Problem Data
F
O
O
D
S
Diet Problem Data
Food
Calorie
s
Total_F
at ProteinVit_A Vit_C
Calciu
m Price
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8
Potatoes,
Baked 171.5 0.2 3.7 0 15.6 22.7 0.5
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Couscous 100.8 0.1 3.4 0 0 7.2 1
White Rice 102.7 0.2 2.1 0 0 7.9 0.4
Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2
Peanut Butter 188.5 16 7.7 0 0 13.1 0.6
Nutrient Min Max
Calories 2000 2250
Total_Fat 0 65
Protein 50 100
Vit A 5000 50000
Vit C 50 20000
Calcium 800 1600
13/11/2013
4
Diet Problem Setup Diet Problem Dual
What does the dual mean?
Food
Calorie
s
Total_F
at ProteinVit_A Vit_C
Calciu
m Price
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8
Potatoes,
Baked 171.5 0.2 3.7 0 15.6 22.7 0.5
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Couscous 100.8 0.1 3.4 0 0 7.2 1
White Rice 102.7 0.2 2.1 0 0 7.9 0.4
Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2
Peanut Butter 188.5 16 7.7 0 0 13.1 0.6
Nutrient Min Max
Calories 2000 2250
Total_Fat 0 65
Protein 50 100
Vit A 5000 50000
Vit C 50 20000
Calcium 800 1600
Optimal Solutions
Food Opt. Amt. Nutrient Dual (yU) Dual (yL)
Peppers 9.55 Calories 0.000 0.002
Potatoes, Baked 0.95 Total_Fat 0.000 0.000
Tofu 5.39 Protein 0.021 0.000
Couscous 0.00 Vit A 0.000 0.002
White Rice 0.00 Vit C 0.000 0.000
Macaroni,Ckd 11.86 Calcium 0.000 0.008
Peanut Butter 0.00
Shadow Cost of Constraints
How does a small change in b
i
affect the total
optimal value?
Linear Programming Problem
(6,11)
13/11/2013
5
Dual Optimum Geometric View
Sensitivity Analysis

1. x
*
and y
*
be optimal primal/dual from final dictionary
2. dictionary is assumed non-degenerate.

For a infinitesimally small change d in b
j
(I.e, b
j
changes to b
j
+d)
the objective changes by y
j
* d
What does the dual mean?
Food
Calorie
s
Total_F
at ProteinVit_A Vit_C
Calciu
m Price
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8
Potatoes,
Baked 171.5 0.2 3.7 0 15.6 22.7 0.5
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Couscous 100.8 0.1 3.4 0 0 7.2 1
White Rice 102.7 0.2 2.1 0 0 7.9 0.4
Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2
Peanut Butter 188.5 16 7.7 0 0 13.1 0.6
Nutrient Min Max
Calories 2000 2250
Total_Fat 0 65
Protein 50 100
Vit A 5000 50000
Vit C 50 20000
Calcium 800 1600
Optimal Solutions
Food Opt. Amt. Nutrient Dual (yU) Dual (yL)
Peppers 9.55 Calories 0.000 0.002
Potatoes, Baked 0.95 Total_Fat 0.000 0.000
Tofu 5.39 Protein 0.021 0.000
Couscous 0.00 Vit A 0.000 0.002
White Rice 0.00 Vit C 0.000 0.000
Macaroni,Ckd 11.86 Calcium 0.000 0.008
Peanut Butter 0.00
Primal Solution
Dual Solution
13/11/2013
6
31
Contoh: Shadow Price
Contoh: Shadow Price
Shadow price jika resource
b
1
bertambah 1 unit
b
1
ditambah 1 unit menjadi 9
Nilai z bertambah 4/5 (shadow
price) 7 + 4/5 = 39/5

Max x
1
+ 3x
2
ST 2x
1
+ 3x
2
+ x
3
= 8
x
1
+ x
2
+ x
4
=1
x
1
, x
2
, x
3
, x
4
> 0
Soal:
The Dakota Furniture Company manufactures desk, tables, and chairs. The
manufacture of each type of furniture lumber and two types of skilled labor:
finishing and carpentry. The amount of each resource needed to make each
type of furniture is given in Table






At present, 48 bard feet of lumber, 20 finishing hours, and 8 carpentry hours
are available. A desk sells for $60, and a table for $30, and a chair for $20.
Dakota believes that demand for desks, chairs and tables is unlimited. Since
available resource have already been purchased. Dakota wants to maximize
total revenue. Do the sensitivity analysis for Dakota problem.
Resource Desk Table Chair
Lumber 8 board ft 6 board ft 1 board ft
Finishing hours 4 hours 2 hours 1.5 hours
Carpentry hours 2 hours 1.5 hours 0.5 hours
0 , ,
8 5 . 0 5 . 1 2
20 5 . 1 2 4
48 6 8 . .
20 30 60
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
>
s + +
s + +
s + +
+ + =
x x x
x x x
x x x
x x x t s
x x x z Max
0 , ,
20 5 . 0 5 . 1
30 5 . 1 2 6
60 2 4 8 . .
8 20 48
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
>
> + +
> + +
> + +
+ + =
y y y
y y y
y y y
y y y t s
y y y w Min
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) 0 8 5 . 0 0 5 . 1 2 2 8
0 8 5 . 1 0 2 2 4 20
24 8 1 0 6 2 8 48
8 , 0 , 2 , 280
3
2
1
3 2 1
= + + =
= + + =
= + + =
= = = =
s
s
s
x x x z
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) 0 20 10 5 . 0 10 5 . 1 0 1
5 30 10 5 . 1 10 2 0 6
0 60 10 2 10 4 0 8
10 , 10 , 0 , 280
3
2
1
3 2 1
= + + =
= + + =
= + + =
= = = =
e
e
e
y y y w
Graphical Sensitivity Analysis
Sensitivity Analysis:
the investigation of the effect of making changes
in the model parameters on a given optimum LP
solution.
Changes in objective coefficients
Changes in right-hand side of the constraints

Graphical Sensitivity Analysis
Example: Stereo Warehouse
Let x = number of receivers to stock
y = number of speakers to stock
Maximize 50x + 20y gross profit
Subject to 2x + 4y 400 floor space
100x + 50y 8000 budget
x 60 sales limit
x, y 0
s
s
s
>
13/11/2013
7
Graphical Sensitivity Analysis
Example: Stereo Warehouse


0
50
100
150
200
0 50 100 150 200
Z=2000
Z=3000
Z=3600
Z=3800
A
B
C
D
E
Optimal solution
( x = 60, y = 40)
Graphical Sensitivity Analysis
Objective-Function Coefficients

0
50
100
150
200
0 50 100 150 200
z = 50x + 20y
x s 60
(constraint 3 )
2 4 400 x y + s (constraint 1)
100 50 8000 x y + s (constraint 2)
A
B
C
D
D(40, 80)
Graphical Sensitivity Analysis
Right-Hand-Side Ranging

0
50
100
150
200
0 50 100 150 200
x s 60
(constraint 3 )
100 50 8000 x y + s (constraint 2)
A
B I
C
D
H
H(60, 280)
DUAL SIMPLEX
Dual Simplex
-basic concept-
Variation of simplex method
Dual feasible but not primal feasible
Mirror image of simplex method
terkait dengan penentuan leaving dan entering
variable
Mengeliminasi penggunaan artificial variable
Digunakan dalam sensitivity analysis
Hanya digunakan sebagai pelengkap solusi
pada dual problem
Dual Simplex
-contoh-
Primal Problem Dual Problem
13/11/2013
8
Dual Simplex
-langkah pengerjaan-
1. Initialization.
Convert constraints in to (by multiplying both sides by -1)
Add slack variables as needed
Find a basic solution (Optimal solution is feasible if the values are zero for
basic variables and nonnegative for non basic variables)
Go to feasiblity test.
2. Feasibility test.
If all basic variables are nonnegative, then it is feasible, therefore optimal
Otherwise, go to iteration.
3. Iterasi
a. Determine the leaving variable. Select basic variable with most negative
value.
b. Determine the entering variable. Select non basic variable with most
negative coefficient in the leaving variable row.
c. Determine the new basic solution. Solve by Gaussian elimination.
d. Return to feasibility test.


Dual Simplex
-latihan soal-
Contoh:



Min 2x
1
+ 3x
2
+ 4x
3
s.t.
x
1
+ 2x
2
+ x
3
> 3
2x
1
x
2
+ 3x
3
> 4
x
1
, x
2
, x
3
> 0
Max -2x
1
3x
2
4x
3
s.t.
-x
1
2x
2
x
3
+ x
4
s -3
-2x
1
+ x
2
3x
3
+ x
5
s -4
x
i
> 0
Dual Simplex
-latihan soal-
z x
1
x
2
x
3
x
4
x
5
RHS
z 1 2 3 4 0 0 0
x
4
0 -1 -2 -1 1 0 -3
x
5
0 -2 1 -3 0 1
-4
z x
1
x
2
x
3
x
4
x
5
RHS
z
x


z x
1
x
2
x
3
x
4
x
5
RHS
z
x


Lecture 9 Preparation
Materi:
Integer Linear Programming
13/11/2013
9

Anda mungkin juga menyukai