Upload
buinhan
View
219
Download
0
Embed Size (px)
Citation preview
Lecture 9
• Outline: – Analisa Sensitivitas Simplex
– Duality
• 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.
Sensitivity Analysis – Objective Function –
• Contoh kasus: 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 3𝑥1 + 2𝑥2 + 5𝑥3
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
𝑥1 + 2𝑥2 + 𝑥3 ≤ 430 (𝑂𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛 1)
𝑥1 + 2𝑥3 ≤ 460 (𝑂𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛 2)
𝑥1 + 4𝑥2 ≤ 420 (𝑂𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛 3)
𝑥1, 𝑥2, 𝑥3 ≥ 0
• Hasil Optimal:
Basic 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 Solution
𝒛 4 0 0 1 2 0 1350
𝒙𝟐 -1/4 1 0 1/2 -1/4 0 100
𝒙𝟑 3/2 0 1 0 1/2 0 230
𝒙𝟔 2 0 0 -2 1 1 20
𝑥1 = mainan – kereta 𝑥2 = mainan – truk 𝑥3 = mainan - mobil
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.
• This definition applies only if the change in the right-hand side of Constraint i leaves the current basis optimal.
Contoh: Shadow Price
Shadow price jika resource
b1 bertambah 1 unit
b1 ditambah 1 unit menjadi 9
Nilai z bertambah 4/5 (shadow
price) 7 + 4/5 = 39/5
Max x1 3x2
ST 2x1 3x2 x3 8
x1 x2 x4 1
x1 , x2 , x3, x4 0
DUALITAS
Terima kasih kepada Prof.Dr.Ir. Abdullah Alkaff, M.Sc. yang telah menyiapkan versi awal dalam tulisan tangan dari materi ini
Linear Programming
Kondisi keoptimalan:
sehingga persoalan LP dapat diintepretasikan sebagai berikut:
cari y1, y2, …, ym sedemikian hingga (1) dan (2) terpenuhi
z0 = y b = y1b1 + y2b2 + … + ymbm (1)
zj = y aj = y1a1j + y2a2j + … + ymamj (2)
Linear Programming
Dapat dilakukan dengan menyelesaikan LP sebagai berikut:
Maka diperoleh problem LP yang baru yang disebut DUAL dari problem semula atau disingkat PROBLEM DUAL
Min z0 = y1b1 + y2b2 + … + ymbm
subject to
y1a1j +y2a2j + … + ymamj cj
y1 , y2 , ym 0
Primal and Dual
The dual problem uses exactly the same parameters as the primal problem, but in different location.
Primal Problem Dual Problem
Max
s.t.
Min
s.t.
n
j
jj xcZ1
,
m
i
ii ybW1
,
aijx j bi,j1
n
m
i
jiij cya1
,
for for .,,2,1 mi .,,2,1 nj
for .,,2,1 mi for .,,2,1 nj ,0jx ,0iy
Primal Dual dalam Matriks
Where and are row
vectors but and are column vectors.
c myyyy ,,, 21 b x
Primal Problem Dual Problem
Maximize
subject to
.0x .0y
Minimize
subject to
bAx cyA
,cxZ ,ybW
Contoh: Primal – Dual
Max
s.t.
Min
s.t.
Primal Problem in Algebraic Form
Dual Problem in Algebraic Form
,53 21 xxZ
,18124 321 yyyW
1823 21 xx
122 2 x41x
0x,0x 21
522 32 yy
33 3 y1y
0y,0y,0y 321
Programa Dual
Hubungan antara PRIMAL dan DUAL adalah sebagai berikut :
PRIMAL DUAL
RHS Fungsi Tujuan
MAX MIN
Constrain Variable
Programa Dual
x1 x2 xn RHS
y1 a11 a12 a1n b1
y2 a21 a22 a2n b2
ym am1 am2 amn bm
c1 c2 cn
Koefisien Fungsi Objektif
(Maksimisasi)
Ko
efi
sie
n F
un
gsi
Ob
jekti
f
(Min
imis
asi)
PRIMAL
DU
AL
Contoh Programa Dual
PRIMAL : Max 3x1 + 5x2
s.t.
x1 4
2x2 12
3x1 + 2x2 18
x1, x2 0
DUAL : Min 4y1 + 12y2 + 18y3
s.t.
y1 + 3y3 3
2y2 + 2y3 5
y1, y2 , y3 0
DUAL dari DUAL adalah PRIMAL
PRIMAL – DUAL
Secara umum hubungan antara DUAL dan PRIMAL dapat digambarkan seperti pada tabel di bawah ini
MINIMASI MAKSIMASI
Unrestricted =
= Unrestricted
Variable
Va
ria
ble
C
onstr
ain
t
Co
nstr
ain
t
Contoh
PRIMAL : Max 8x1 + 3x2
s.t.
x1 – 6x2 4
5x1 + 7x2 = – 4
x1 0
x2 0
DUAL : Min 4w1 – 4w2
s.t.
w1 + 5w2 8
– 6w1 + 7w2 3
w1 0
w2 unrestricted
Contoh 2
RI-1333 OR1/sew/2007/#6
Primal: Max. z = 3x1 + 2x2 (Obj. Func.)
subject to
2x1 + x2 100 (Finishing constraint)
x1 + x2 80 (Carpentry constraint)
x1 40 (Bound on soldiers)
x1, x2 0
Optimal Solution: z = 180, x1 = 20, x2 = 60
Dual : Min. w = 100y1 + 80y2 + 40y3 (Obj. Func.)
subject to
2y1 + y2 + y3 3
y1 + y2 2
y1, y2, y3 0
Complementary Basic Solution Problem Dual :
Constraint zj – cj 0 ; zj cj
zj – Surplus Var = cj
atau
Surplus Var. = zj – cj
Dalam Tableau
Original Variables Slack Variables
x1 x2 xn xn+1 xn+2 xn+m
Baris 0: z1 – c1 z2 – c2 zn – cn y1 y2 ym
Complementary Basic Solution
PRIMAL VARIABLES DUAL VARIABLES
Original Variable : xj zj – cj : Surplus Variable
Slack Variable : xn+i yi : Original Variable
Basic Nonbasic
Nonbasic Basic
Original Variables Slack Variables
x1 x2 xn xn+1 xn+2 xn+m
Baris 0: z1 – c1 z2 – c2 zn – cn y1 y2 ym
Dalam Tableau
Complementary Basic Solution
PRIMAL VARIABLES DUAL VARIABLES
Original Variable : xj zj – cj : Surplus Variable
Slack Variable : xn+i yi : Original Variable
Basic Nonbasic
Nonbasic Basic
1) Bila xj > 0, maka ………..….
2) Bila xn+i > 0, maka………….
3) Bila yi > 0, maka ……….……
4) Bila zj–cj > 0, maka…….…...
Complementary Basic Solution
Dapat diringkas sebagai berikut:
1. xn+i yi = 0
2. (zj – cj) xj = 0
Jadi constraint di satu problem adalah renggang (non-binding), maka variabel yang berkaitan dengan constrain ini dalam problem yang lain harus nol.
Hasil ini biasa dikenal sebagai Complementary Slackness
Contoh:
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
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,,
85.05.12
205.1 24
48 6 8 ..
203060
321
321
321
321
321
xxx
xxx
xxx
xxxts
xxxzMax
0,,
205.05.1
305.1 26
60 2 4 8 ..
82048
321
321
321
321
321
yyy
yyy
yyy
yyyts
yyywMin
085.005.1228
085.1022420
2481062848
8 ,0 ,2 ,280
3
2
1
321
s
s
s
xxxz
020105.0105.101
530105.110206
06010210408
10 ,10 ,0 ,280
3
2
1
321
e
e
e
yyyw
Contoh
0 ,
1
832
Subject to
3 Max
21
21
21
21
xx
xx
xx
xx
0 , , ,
1
8 32
Subject to
3 Max
4321
421
321
21
xxxx
xxx
xxx
xx
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
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
Hubungan PRIMAL – DUAL
Bila x adalah feasible terhadap PRIMAL dan y feasible terhadap DUAL, maka cx yb
Nilai objektif problem Max Nilai objektif problem Min
DUAL Constraint y A c
x 0 y Ax cx
Ax b y b cx
Teorema Dualitas
● Bila x* adalah penyelesaian dari PRIMAL dan y* adalah penyelesaian dari DUAL, maka cx* = y*b
● Bila x0 feasible terhadap PRIMAL dan y0 feasible terhadap DUAL sedemikian hingga cx0 = y0b, maka x0 dan y0 adalah penyelesaian optimal
Menyelesaikan
PRIMAL
Menyelesaikan
DUAL
z DUAL FR
PRIMAL FR
Optimal
(PRIMAL – DUAL FEASIBLE)
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