You are on page 1of 9

13/11/2013

Lecture 8

PENELITIAN OPERASIONAL I LINEAR PROGRAMMING


(TIN 4109)

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.
DUALITAS
8th Edition. Prentice-Hall, Inc, 2007.

Hubungan PRIMAL – DUAL Teorema Dualitas


● Bila x* adalah penyelesaian dari PRIMAL dan y* adalah
DUAL Constraint yAc
penyelesaian dari DUAL, maka cx* = y*b
x  0  y Ax  cx
● Bila x0 feasible terhadap PRIMAL dan y0 feasible
Ax  b  y b  cx
terhadap DUAL sedemikian hingga cx0 = y0b, maka x0
 Bila x adalah feasible terhadap PRIMAL dan y feasible dan y0 adalah penyelesaian optimal
terhadap DUAL, maka cx  yb
z Menyelesaikan
DUAL FR
 Nilai objektif problem Max  Nilai objektif problem DUAL
Optimal
Min PRIMAL FR
(PRIMAL – DUAL FEASIBLE)
Menyelesaikan
PRIMAL

1
13/11/2013

Teorema Dualitas Both Primal and Dual Infeasible.


1. P optimal  D optimal

2. P tak terbatas  D tidak feasible


D tak terbatas  P tidak feasible

3. P tidak feasible  D tak terbatas/tidak feasible


D tidak feasible  P tak terbatas/tidak feasible ,
,

Dual Certificate 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.

Someone tells us x* is an optimal solution. 1. Check feasibility of x using primal problem


Do we trust them? 2. Form dual problem and check feasibility of y
• Check if x* is feasible? 3. Check that primal objective value is equal to dual
• How to check if it is optimal? objective value.

Contoh
Complementary Variable Pairs M ax x1  3 x2 M ax x1  3x2
Subject to Subject to
2 x1  3 x2  8 2 x1  3x2  x3 8
 x1  x2  1  x1  x2  x4  1
Primal Dual Slack x1 , x2  0 x1 , x2 , x3 , x4  0
Decision Variables
Variables z x1 x2 x3 x4 RHS
z 1 -1 -3 0 0 0
x3 0 2 3 1 0 8
x4 0 -1 1 0 1 1
z 1 -4 0 0 3 3
Primal x3 0 5 0 1 -3 5
Slack Dual Decision x2 0 -1 1 0 1 1
Variables Variables z 1 0 0 0.8 0.6 7
x1 0 1 0 0.2 -0.6 1
x2 0 0 1 0.2 0.4 2

2
13/11/2013

z x1 x2 x3 x4 RHS
Pada Problem Dual z 1 -1 -3 0 0 0
x3 0 2 3 1 0 8
x4 Hubungan
0 -1 1 Primal
0 - 1Dual1
z 1 -4 0 0 3 3
x3
Primal
x
0 5 0 1 -3 5
2 0 -1 1 0 1 1
z 1 0 0 0.8 0.6 7
x1 0 1 0 0.2 -0.6 1
x2 0 0 1 0.2 0.4 2

Dual

Shadow Price
• It is often important for managers to determine how a
change in a constraint’s right-hand side changes the
LP’s optimal z-value.
• With this in mind, we define the shadow price for the
ith constraint of an LP to be the amount by which the
optimal z-value is improved—increased in a max
problem and decreased in a min problem—if the right-
hand side of the ith constraint is increased by 1.
ANALISA SENSITIVITAS • This definition applies only if the change in the right-
hand side of Constraint i leaves the current basis
optimal.

Diet Problem Data Diet Problem Data


Calorie Total_F Calciu
Food s at Protein Vit_A Vit_C m Price
F
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8 Nutrient Min Max
O
O Potatoes, Calories 2000 2250
D Baked 171.5 0.2 3.7 0 15.6 22.7 0.5 Total_Fat 0 65
S
Protein 50 100
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Vit A 5000 50000
Couscous 100.8 0.1 3.4 0 0 7.2 1 Vit C 50 20000
Calcium 800 1600
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

3
13/11/2013

Diet Problem Setup Diet Problem Dual

What does the dual mean? Optimal Solutions


Calorie Total_F Calciu
Food s at Protein Vit_A Vit_C m Price
Food Opt. Amt. Nutrient Dual (yU) Dual (yL)
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8 Nutrient Min Max
Peppers 9.55 Calories 0.000 0.002
Potatoes, Calories 2000 2250
Baked 171.5 0.2 3.7 0 15.6 22.7 0.5 Total_Fat 0 65
Potatoes, Baked 0.95 Total_Fat 0.000 0.000
Protein 50 100
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Vit A 5000 50000 Tofu 5.39 Protein 0.021 0.000
Couscous 100.8 0.1 3.4 0 0 7.2 1 Vit C 50 20000
Couscous 0.00 Vit A 0.000 0.002
Calcium 800 1600
White Rice 102.7 0.2 2.1 0 0 7.9 0.4
White Rice 0.00 Vit C 0.000 0.000
Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2
Macaroni,Ckd 11.86 Calcium 0.000 0.008
Peanut Butter 188.5 16 7.7 0 0 13.1 0.6
Peanut Butter 0.00

Shadow Cost of Constraints Linear Programming Problem

(6,11)

How does a “small” change in b i affect the total


optimal value?

4
13/11/2013

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 bj (I.e, bj changes to bj +d)


the objective changes by yj * d

What does the dual mean? Optimal Solutions


Dual Solution
Primal Solution
Calorie Total_F Calciu
Food s at Protein Vit_A Vit_C m Price
Food Opt. Amt. Nutrient Dual (yU) Dual (yL)
Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8 Nutrient Min Max
Peppers 9.55 Calories 0.000 0.002
Potatoes, Calories 2000 2250
Baked 171.5 0.2 3.7 0 15.6 22.7 0.5 Total_Fat 0 65
Potatoes, Baked 0.95 Total_Fat 0.000 0.000
Protein 50 100
Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1
Vit A 5000 50000 Tofu 5.39 Protein 0.021 0.000
Couscous 100.8 0.1 3.4 0 0 7.2 1 Vit C 50 20000
Couscous 0.00 Vit A 0.000 0.002
Calcium 800 1600
White Rice 102.7 0.2 2.1 0 0 7.9 0.4
White Rice 0.00 Vit C 0.000 0.000
Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2
Macaroni,Ckd 11.86 Calcium 0.000 0.008
Peanut Butter 188.5 16 7.7 0 0 13.1 0.6
Peanut Butter 0.00

5
13/11/2013

Contoh: Shadow Price Contoh: Shadow Price


Max x1  3x 2
ST 2x1  3x 2  x 3 8
 x1  x 2  x4  1
x1 , x 2 , x 3, x 4  0 b1 ditambah 1 unit menjadi 9



Shadow price jika resource Nilai z bertambah 4/5 (shadow


31
b1 bertambah 1 unit price)  7 + 4/5 = 39/5

Soal: Max z  60 x1  30 x2  20 x3
z  280, x1  2, x2  0, x3  8
s.t. 8 x1  6 x2  x3  48 s1  48  82  60  18  24
The Dakota Furniture Company manufactures desk, tables, and chairs. The 4 x1  2 x2  1.5 x3  20
manufacture of each type of furniture lumber and two types of skilled labor: s2  20  42  20  1.58  0
finishing and carpentry. The amount of each resource needed to make each 2 x1  1.5 x2  0.5 x3  8 s3  8  22  1.50  0.58  0
type of furniture is given in Table x1 , x2 , x3  0
Resource Desk Table Chair
Lumber 8 board ft 6 board ft 1 board ft
Finishing hours 4 hours 2 hours 1.5 hours Min w  48 y1  20 y2  8 y3
w  280, y1  0, y2  10, y3  10
s.t. 8 y1  4 y2  2 y3  60
e1  80  410  210  60  0
Carpentry hours 2 hours 1.5 hours 0.5 hours
6 y1  2 y2  1.5 y3  30
At present, 48 bard feet of lumber, 20 finishing hours, and 8 carpentry hours
e2  60  210  1.510  30  5
are available. A desk sells for $60, and a table for $30, and a chair for $20. y1  1.5 y2  0.5 y3  20
Dakota believes that demand for desks, chairs and tables is unlimited. Since e3  10  1.510  0.510  20  0
available resource have already been purchased. Dakota wants to maximize y1 , y2 , y3  0
total revenue. Do the sensitivity analysis for Dakota problem.

Graphical Sensitivity Analysis Graphical Sensitivity Analysis


• Sensitivity Analysis: Example: Stereo Warehouse
– the investigation of the effect of making changes Let x = number of receivers to stock
in the model parameters on a given optimum LP y = number of speakers to stock
solution.
Maximize 50x + 20y gross profit
• Changes in objective coefficients
• Changes in right-hand side of the constraints
Subject to 2x + 4y  400 floor space
100x + 50y  8000 budget
x  60 sales limit
x, y  0

6
13/11/2013

Graphical Sensitivity Analysis


Graphical Sensitivity Analysis
Objective-Function Coefficients
• Example: Stereo Warehouse
Z=3800

Z=3600
200
z = 50x + 20y
Z=3000 200

150
x  60
Z=2000 150 (constraint 3 )

100
D 2 x  4 y  400 (constraint 1)
E
100 Optimal solution
D
( x = 60, y = 40) 100x  50 y  8000 (constraint 2)
50
C

50 C
0
A
D(40, 80) 0 50 B 100 150 200
0
A
0 50 B 100 150 200

Graphical Sensitivity Analysis


Right-Hand-Side Ranging

200

150 x  60 (constraint 3 )

100
D
H 100x  50 y  8000 (constraint 2)
50

DUAL SIMPLEX
C

0
A
0 50 B I 100 150 200
H(60, 280)

Dual Simplex Dual Simplex


-basic concept- -contoh-
Variation of simplex method Dual Problem
Primal Problem
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

7
13/11/2013

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 2x1 + 3x2 + 4x3 Max -2x1 – 3x2 – 4x3
s.t. s.t.
x1 + 2x2 + x3  3 -x1 – 2x2 – x3 + x4  -3
2x1 – x2 + 3x3  4 -2x1 + x2 – 3x3 + x5  -4
x1 , x2 , x3  0 xi  0

Dual Simplex
Lecture 9 – Preparation
-latihan soal-
z x1 x2 x3 x4 x5 RHS • Materi:
z 1 2 3 4 0 0 0
– Integer Linear Programming
x4 0 -1 -2 -1 1 0 -3
x5 0 -2 1 -3 0 1 -4

z x1 x2 x3 x4 x5 RHS
z
x…
x…

z x1 x2 x3 x4 x5 RHS
z
x…
x…

8
13/11/2013

You might also like