METODE KNAPSACK
Pendahuluan (1) Metode Knapsack digunakan untuk menyelesaikan persoalan integer programming (IP) yang hanya memiliki pembatas tunggal dan seluruh variabel keputusannya berharga 0 atau 1.
Pendahuluan (2) BRANCH AND BOUND KNAPSACK Jumlah variabel keputusan = 2 Jumlah variabel keputusan ≥ 2 Jumlah fungsi pembatas ≥ 1 Jumlah fungsi pembatas = 1 Nilai variabel keputusan menunjukkan nilai sebenarnya Nilai variabel keputusan hanya sebagai simbolis ( “0” = tidak “1” = ya )
MODEL IP UNTUK KNAPSACK Maks / Min Z = C1 X1 + C2 X2 +…+ Cn Xn s/t a1 X1 + a2 X2 +…+ an Xn ≤ b Xi = 0 atau 1
Prosedur Knapsack Tentukan jumlah variabel keputusan (VK) Tentukan ratio (perbandingan antara manfaat dengan sumber terpakai ) dari setiap variabel keputusan Tentukan peringkat untuk setiap VK berdasarkan ratio yang telah didapat Lakukan proses pemenuhan sumber yang dibutuhkan setiap VK berdasarkan peringkat
Contoh soal Maks Z = 18X1 + 14X2 + 8X3 + 4X4 s/t 15X1 + 12X2 + 7X3 + 4X4 + X5 ≤ 37 X1,2,3,4 = 0 atau 1
SUB PERSOALAN 1 X1 18/15 1 X2 14/12 2 X3 8/7 3 X4 4/4 4 X5 0/1 5 VARIABEL KEPUTUSAN RASIO PERINGKAT X1 18/15 1 X2 14/12 2 X3 8/7 3 X4 4/4 4 X5 0/1 5 X1 = 1-----------> 37 - 15 = 22 X2 = 1-----------> 22 - 12 = 10 X3 = 1-----------> 10 - 7 = 3 X4 = ¾ X5 = 0
SUB PERSOALAN 1 SP – 1 X1 = X2 = X3 = 1 X4 = ¾ X5 = 0 SP – 2 X4 = 0
SUB PERSOALAN 2 VARIABEL KEPUTUSAN PERINGKAT X1 2 X2 3 X3 4 X4 1 X5 5 X4 = 0-----------> 37 - 0 = 37 X1 = 1-----------> 37 - 15 = 22 X2 = 1-----------> 22 - 12 = 10 X3 = 1-----------> 10 - 7 = 3 X5 = 1-----------> 3 - 1 = 2
SUB PERSOALAN 2 SP – 2 X1 = X2 = X3 = X5 = 1 X4 = 0 Z = 40
SUB PERSOALAN 3 VARIABEL KEPUTUSAN PERINGKAT X1 2 X2 3 X3 4 X4 1 X5 5 X4 = 1-----------> 37 - 4 = 33 X1 = 1-----------> 33 - 15 = 18 X2 = 1-----------> 18- 12 = 6 X3 = 6/7 X5 = 0
SUB PERSOALAN 3 SP – 3 X1 = X2 = X4 = 1 X3 = 6/7 X5 = 0 SP – 4 X3 = 0
SUB PERSOALAN 4 VARIABEL KEPUTUSAN PERINGKAT X1 3 X2 4 X3 1 X4 2 X5 5 X3 = 0-----------> 37 - 0 = 37 X4 = 1-----------> 37 - 4 = 33 X1 = 1-----------> 33- 15 = 18 X2 = 1-----------> 18- 12 = 6 X5 = 1-----------> 6- 1 = 5
SUB PERSOALAN 4 SP – 4 X1 = X2 = X4 = X5 = 1 X3= 0 Z = 36
SUB PERSOALAN 5 VARIABEL KEPUTUSAN PERINGKAT X1 3 X2 4 X3 1 X4 2 X5 5 X3 = 1-----------> 37 - 7 = 30 X4 = 1-----------> 30 - 4 = 26 X1 = 1-----------> 26- 15 = 11 X2 = 11/12 X5 = 0
SUB PERSOALAN 5 SP – 5 X1 = X3 = X4 = 1 X2 = 11/12 X5 = 0 SP – 6
SUB PERSOALAN 6 VARIABEL KEPUTUSAN PERINGKAT X1 4 X2 1 X3 2 X4 3 X5 5 X2 = 0-----------> 37 - 0 = 37 X3 = 1-----------> 37 - 7 = 30 X4 = 1-----------> 30- 4 = 26 X1 = 1-----------> 26- 15 = 11 X5 = 1-----------> 11- 1 = 10
SUB PERSOALAN 6 SP – 6 X1 = X3 = X4 = X5 = 1 X2= 0 Z = 30
SUB PERSOALAN 7 VARIABEL KEPUTUSAN PERINGKAT X1 4 X2 1 X3 2 X4 3 X5 5 X2 = 1-----------> 37 - 12 = 25 X3 = 1-----------> 25 - 7 = 18 X4 = 1-----------> 18- 4 = 14 X2 = 14/15 X5 = 0
SUB PERSOALAN 7 SP – 7 X2 = X3 = X4 = 1 X1 = 14/15 X5 = 0 SP – 8
SUB PERSOALAN 8 VARIABEL KEPUTUSAN PERINGKAT X1 1 X2 2 X3 3 X4 4 X5 5 X1 = 0-----------> 37 - 0 = 37 X2 = 1-----------> 37 - 12 = 25 X3 = 1-----------> 25- 7 = 18 X4 = 1-----------> 18- 4 = 14 X5 = 1-----------> 14- 1 = 9
SUB PERSOALAN 8 SP – 8 X2 = X3 = X4 = X5 = 1 X1= 0 Z = 26
SUB PERSOALAN 9 VARIABEL KEPUTUSAN PERINGKAT X1 1 X2 2 X3 3 X4 4 X5 5 X1 = 1-----------> 37 - 15 = 22 X2 = 1-----------> 22 - 12 = 10 X3 = 1-----------> 10- 7 = 3 X4 = 1------------- fathomed
FATHOMED SP – 1 X1 = X2 = X3 = 1 X4 = ¾ X5 = 0 SP – 2 SP – 3 Z = 40 SP – 3 X1 = X2 = X4 = 1 X3 = 6/7 X5 = 0 SP – 4 X1 = X2 = X4 = X5 = 1 X3= 0 Z = 36 SP – 5 X1 = X3 = X4 = 1 X2 = 11/12 X5 = 0 SP – 6 X1 = X3 = X4 = X5 = 1 X2= 0 Z = 30 SP – 7 X2 = X3 = X4 = 1 X1 = 14/15 X5 = 0 SP – 8 X2 = X3 = X4 = X5 = 1 X1= 0 Z = 26 FATHOMED