Lecture 12 - Assignment Problem
Lecture 12 - Assignment Problem
Assignment
Problem
2 0 1 2 3
min ååc ij x ij
i j
Method
Cost
Hungarian
Coefficient Lebih efektif dan
Algorithm efisien untuk
Matrix
optimal solution
1 3 2 5 4 2 2 0 1 2 3
2 0 1 2 3 0 3 5 2 0 4
3 4 1 -1 3 -1 4 0 3 1 2
4 2 5 3 4 2
Minimum
Value of 0 0 0 2
Kurangkan nilai masing-masing baris dengan
Column
minimum value of row
Lanjutan
Biaya Penugasan
Reduced
Biaya Penugasan Matrix
Project
Manager Project
1 2 3 4 Manager
1 2 3 4
1 1 0 3 2 1 1 0 3 0
2 0 1 2 3 2 0 1 2 1
3 5 2 0 4
3 5 2 0 2
4 0 3 1 2 4 0 3 1 0
Minimum
Value of 0 0 0 2 Pilih nilai (biaya) = 0
Column
Terdapat 4 assignment yang bernilai 0,
Kurangkan nilai masing-masing kolom
sehingga sesuai dengan matriks
dengan minimum value of column
problem (M4x4)
Lanjutan
Original Cost
Reduced
Matrix Biaya Penugasan
Biaya Penugasan
Project
Manager Project
1 2 3 4 Manager
1 2 3 4
1 1 0 3 0
1 3 2 5 4
2 0 1 2 1
2 0 1 2 3
3 5 2 0 2
3 4 1 -1 3
4 0 3 1 0
4 2 5 3 4
Pilih nilai sel terkecil dari semua sel yang belum ditutup
garis. Lalu, kurangkan nilai tsb pada semua sel yang belum
ditutup garis
Biaya Penugasan
Biaya Penugasan
Minimum Project
Project Value of Manager
Manager Row 1 2 3
1 2 3
1 0 3 5
1 2 5 7 2
2 3 1 0
2 4 2 1 1
3 0 4 3
3 2 6 5 2
Minimum
Kurangkan nilai masing-masing baris dengan Value of 0 1 0
minimum value of row Column
Lanjutan
Reduced
Biaya Penugasan Biaya Penugasan Matrix
Project Project
Manager Manager
1 2 3 1 2 3
1 0 3 5 1 0 2 5
2 3 1 0 2 3 0 0
3 0 4 3 3 0 3 3
Minimum
Value of 0 1 0 Pilih nilai (biaya) = 0
Column
Hanya terdapat 2 assignment yang bernilai 0
Kurangkan nilai masing-masing kolom Karena tidak sesuai dengan matriks problem
dengan minimum value of column (M3x3), maka dikerjakan dengan Hungarian
Algorithm
Lanjutan
Pilih nilai terkecil
Reduced dari semua sel yang Biaya Penugasan
Matrix Biaya Penugasan Minimum belum ditutup garis
Value of Project
Project Manager
Manager Row &
1 2 3
1 2 3 Column
0 3
1 0 2 5 2 1 0
(2-2) (5-2)
2 2 3 0 0 -
5
3 0 3 3 2 0 0
3 (3+2)
1 1
1 3 0
(3-2) (3-2)
Step 1: Subtract minimum number in each row from all numbers in that
row. Since each row has a zero, we would simply generate the same
matrix above.
Step 2: Subtract the minimum number in each column from all numbers in
the column. For A it is 25, for B it is 25, for C it is 14, for Dummy it is 0.
This yields:
Contoh: Fungsi Minimasi
• Step 3: Draw the minimum number of lines to cover all zeroes. Although one
can "eyeball" this minimum, use the following algorithm. If a "remaining" row
has only one zero, draw a line through the column. If a remaining column has
only one zero in it, draw a line through the row.
Pabrik
1 2 3 4 5
1 -525 630 105 -1050 -245
Produk 2 -5600 11040 -5760 3200 7200
3 -1080 -918 -1242 -594 -918
4 0 0 0 0 0
5 0 0 0 0 0
Pabrik
Solusi 1
1 2 3 4 5 Min Row
1 -525 630 105 -1050 -245 -1050
Produk 2 -5600 11040 -5760 3200 7200 -5760
3 -1080 -918 -1242 -594 -918 -1242
4 0 0 0 0 0 0
5 0 0 0 0 0 0
Pabrik
2
1 2 3 4 5
1 525 1680 1155 0 805
Produk 2 160 16800 0 8960 12960
3 162 324 0 648 324
4 0 0 0 0 0
5 0 0 0 0 0
Min
0 0 0 0 0
Column
Solusi 3
Pabrik
1 2 3 4 5
1 525 1680 1155 0 805
Produk 2 160 16800 0 8960 12960
3 162 324 0 648 324
4 0 0 0 0 0
5 0 0 0 0 0
Pabrik
4
1 2 3 4 5
1 365 1520 1155 0 645
Produk 2 0 16640 0 8960 12800
3 2 164 0 648 164
4 0 0 160 160 0
5 0 0 160 160 0
Solusi
Pabrik
1 2 3 4 5
1 365 1520 1155 0 645
Produk 2 0 16640 0 8960 12800
3 2 164 0 648 164
4 0 0 160 160 0
5 0 0 160 160 0
Exercise 1
Machine 1 14 5 8 7
Machine 2 2 12 6 5
Machine 3 7 8 3 9
Machine 4 2 4 6 10
Terima Kasih