Professional Documents
Culture Documents
Prasun Das
Indian Statistical Institute
SQC & OR Unit
Kolkata, India
dasprasun@rediffmail.com
8-Aug-18 1
AP – An Example
8-Aug-18 2
AP – Cost Matrix ((cij))
Setup times
(also called the Cost matrix)
Time (Hours)
Job1 Job2 Job3 Job4
M/c.-1 14 5 8 7
M/c.-2 2 12 6 5
M/c.-3 7 8 3 9
M/c.-4 2 4 6 10
8-Aug-18 3
AP - The Model
According to the setup table, shown earlier, the problem can be
formulated as follows (for i,j=1,2,3,4):
min Z 14 X 11 5 X 12 8 X 13 7 X 14 2 X 21 12 X 22 6 X 23 5 X 24
7 X 31 8 X 32 3 X 33 9 X 34 2 X 41 X 42 6 X 43 10 X 44
s.t. X 11 X 12 X 13 X 14 1
X 21 X 22 X 23 X 24 1
X 31 X 32 X 33 X 34 1
X 41 X 42 X 43 X 44 1
X 11 X 21 X 31 X 41 1
X 12 X 22 X 32 X 42 1
X 13 X 23 X 33 X 43 1
X 14 X 24 X 34 X 44 1
Xij 0orXij 1
8-Aug-18 4
AP – Decision Variable
For the model on the previous page note that:
8-Aug-18 5
AP - Description
An assignment problem is a special case of a transportation
problem in which the total number of origins is equal to the
total number of destinations and the assignment of m
workers/machines to m jobs, say, will have to be made on an
1-to-1 basis. The problem is to achieve the assignment at
minimum cost, given that the cost/time of worker/machine i
performing job j is cij. It assumes all workers/machines are
assigned and each job is performed. [Assignment problems
may be solved as linear programming problems.]
8-Aug-18 6
AP – LP Formulation
Min SScijxij
ij
s.t. Sxij = 1 for each worker/machine i
j
Sxij = 1 for each job j
i
xij = 0 or 1 for all i and j.
Note: A modification to the right-hand side of the first
constraint set can be made if a worker/machine is
permitted to work more than 1 job.
8-Aug-18 7
AP – LP Formulation
• Special considerations using linear programming can
include:
– number of workers/machines less than the number of
jobs — add dummy workers/machines with 0
assignment costs as needed
– worker i cannot do job j — add constraint Xij = 0
– worker i must do job j — add constraint Xij = 1
8-Aug-18 8
AP-Hungarian Method
For a certain class of transportation problems, called
assignment problems, the transportation simplex is often very
inefficient (severe degeneracy). For that reason there is
another method called The Hungarian Method (Flood’s
Technique).
8-Aug-18 10
AP-Hungarian Method
Step-2. Draw the minimum number of lines M (horizontal and/or
vertical) that are needed to cover all zeros in the reduced cost
matrix. If exactly m lines are required (i.e. M = m) to cover all
zeros, an optimal solution is available among the covered zeros in
the matrix and goto step 4. Otherwise, if M<m, proceed to step 3.
Step-3. Find the smallest nonzero element (call its value k) in the
reduced cost matrix that is uncovered by the lines drawn in step
2. Now subtract k from each uncovered element of the reduced
cost matrix and add k to each element that is covered by two lines
(intersection of horizontal/vertical lines). Return to step 2.
8-Aug-18 11
AP-Hungarian Method
Step-4. Retain only the zero entries. Examine row by row, encircle
simple single unmarked zero. An assignment will be made here.
Further cancel all other zeros in the column of the encircled zeros.
All the rows are thus examined. Similarly, each column is
examined for single unmarked zero, and if any such zero is found
it is encircled and all other zeros in its row are cancelled.
Two situations are possible:
(i) No unmarked zero is left goto step 6
(ii) A row/column contains more than one unmarked zero goto
step 5.
8-Aug-18 12
AP-Hungarian Method
Step-5. In this case, any one of the unmarked zero is arbitrarily
chosen and encircled and all other zeros in its row and column are
cancelled. Step 4 is repeated until no unmarked zero is left.
8-Aug-18 13
AP-Problems
Problem-1 (balanced): Three jobs A,B,C are to be assigned to
three machines X,Y,Z. The processing cost (in Rs.) are given in
the following cost matrix. Find the optimal assignment for
minimum cost.
X Y Z
A 19 28 31
B 11 17 16
C 12 15 13
8-Aug-18 14
AP-Problems
Problem-2 (balanced): A Project work consists of four major jobs for
which four contractors have submitted tenders. The tender amounts (in
lakh of Rs.) are given below. Find the optimal assignment which
minimizes the total cost of the project (each contractor must be
assigned one job).
A B C D
1 10 24 30 15
2 16 22 28 12
3 12 20 32 10
4 9 26 34 16
8-Aug-18 15
AP-Problems
Problem-3 (unbalanced): A company had four machines and three jobs to be
done on them. The cost of operations is given below. Determine the optimal
assignment for minimum cost.
X Y Z T
A 18 24 28 32 Home Work!
B 8 13 17 19
C 10 15 19 22
Hint: Take a fictitious job D
Ans: A X; B Y; C Z with Min Cost = 50
8-Aug-18 16